#!/bin/sh
#
# This file is used to setup the gpio ports: per application.
#
# Setup ports a,b,f,h.
#
# Use: portX init_val pin_use_bitmask
# 	pin_use_bitmask: 1=output 0=input
#
# PORTA:
#	Bit 7 : 1 : Out : CS_SERIAL_FLASH#
#	Bit 6 : 1 : Inp : Unused
#	Bit 5 : 1 : Inp : Unused
#	Bit 4 : 1 : Inp : Unused
#
#	Bit 3 : 1 : Inp : Unused
#	Bit 2 : 1 : Inp : Unused
#	Bit 1 : 1 : Out : SW_RESET#
#	Bit 0 : 1 : Inp : PARALLEL_FLASH_STATUS
#
# PORTA has already been setup by a special version of redboot, so
# we won't do it again here
#
#porta 0xff 0x82
#
# PORTB:
#	Bit 7 : 1 : Inp : Unused
#	Bit 6 : 1 : Inp : Unused
#	Bit 5 : 1 : Inp : Unused
#	Bit 4 : 1 : Out : RES_RQST#
#
#	Bit 3 : 1 : Inp : Unused
#	Bit 2 : 1 : Out : BOOT_ACK
#	Bit 1 : 1 : Inp : Unused
#	Bit 0 : 1 : Inp : Unused
#
portb 0xfb 0x14
#
# PORTF:
#	Bit 7 : 1 : Inp : NC
#	Bit 6 : 1 : Inp : NC
#	Bit 5 : 1 : Inp : NC
#	Bit 4 : 1 : Inp : NC
#
#	Bit 3 : 1 : Inp : Unused
#	Bit 2 : 1 : Inp : Unused
#	Bit 1 : 1 : Inp : Unused
#	Bit 0 : 1 : Inp : NC
#
portf 0xff 0x08
#
# PORTH:
#	Bit 7 : 1 : Inp : NC
#	Bit 6 : 1 : Inp : NC
#	Bit 5 : 1 : Inp : Unused
#	Bit 4 : 1 : Inp : Unused
#
#	Bit 3 : 1 : Out : USB_POWER
#	Bit 2 : 1 : Inp : Unused
#	Bit 1 : 1 : Inp : NC
#	Bit 0 : 1 : Inp : NC
#
porth 0xff 0x08

