#!/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 : FLASH_EN#
#	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 : Inp : Unused
#	Bit 0 : 1 : Inp : Unused
#
porta 0xff 0x80
#
# PORTB:
#	Bit 7 : 1 : Inp : Unused
#	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 : Inp : Unused
#	Bit 0 : 1 : Inp : Unused
#
portb 0xff 0x00
#
# PORTF:
#	Bit 7 : 1 : Inp : Unused
#	Bit 6 : 1 : Inp : Unused
#	Bit 5 : 1 : Inp : Unused
#	Bit 4 : 1 : Inp : Unused
#
#	Bit 3 : 1 : Inp : Unused
#	Bit 2 : 0 : Out : RES_CPU#
#	Bit 1 : 1 : Inp : DEFAULT#
#	Bit 0 : 1 : Inp : Unused
#
# NOTE: We keep RES_CPU# high
#	Initial output value = 0xff (RES_CPU# high).

portf 0xff 0x04
#
# PORTH:
#	Bit 7 : 1 : Inp : Unused
#	Bit 6 : 1 : Inp : Unused
#	Bit 5 : 1 : Inp : ACK
#	Bit 4 : 1 : Inp : Unused
#
#	Bit 3 : 1 : Inp : TNE
#	Bit 2 : 1 : Inp : SDA#
#	Bit 1 : 1 : Inp : Unused
#	Bit 0 : 1 : Inp : Unused
#
porth 0xff 0x00

