diff options
Diffstat (limited to 'misc/Obsoleted/configs/16z/src')
-rw-r--r-- | misc/Obsoleted/configs/16z/src/.gitignore | 4 | ||||
-rw-r--r-- | misc/Obsoleted/configs/16z/src/Makefile | 90 | ||||
-rw-r--r-- | misc/Obsoleted/configs/16z/src/z16f_leds.c | 175 | ||||
-rw-r--r-- | misc/Obsoleted/configs/16z/src/z16f_lowinit.c | 300 |
4 files changed, 569 insertions, 0 deletions
diff --git a/misc/Obsoleted/configs/16z/src/.gitignore b/misc/Obsoleted/configs/16z/src/.gitignore new file mode 100644 index 000000000..b268f1933 --- /dev/null +++ b/misc/Obsoleted/configs/16z/src/.gitignore @@ -0,0 +1,4 @@ +/Make.dep +/.depend +/*.obj + diff --git a/misc/Obsoleted/configs/16z/src/Makefile b/misc/Obsoleted/configs/16z/src/Makefile new file mode 100644 index 000000000..1632c6f88 --- /dev/null +++ b/misc/Obsoleted/configs/16z/src/Makefile @@ -0,0 +1,90 @@ +############################################################################ +# configs/16z/Makefile +# +# Copyright (C) 2014 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt <gnutt@nuttx.org> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/Make.defs + +SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched +ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common" +else + WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)} + WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} + USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common' +endif + +INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES) +CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) $(EXTRADEFINES) + +ASRCS = +AOBJS = $(ASRCS:.S=$(OBJEXT)) +CSRCS = z16f_lowinit.c z16f_leds.c +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +all: libboard$(LIBEXT) + +$(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S + $(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp + $(Q) cat $@.tmp | sed -e "s/^#/;/g" > $@ + $(Q) rm $@.tmp + +$(AOBJS): %$(OBJEXT): %$(ASMEXT) + $(call ASSEMBLE, $<, $@) + +$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +libboard$(LIBEXT): $(OBJS) + $(call ARCHIVE, $@, $(OBJS)) + +.depend: Makefile $(SRCS) + $(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ + +depend: .depend + +clean: + $(call DELFILE, libboard$(LIBEXT)) + $(call CLEAN) + +distclean: clean + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) + +-include Make.dep diff --git a/misc/Obsoleted/configs/16z/src/z16f_leds.c b/misc/Obsoleted/configs/16z/src/z16f_leds.c new file mode 100644 index 000000000..483ec1662 --- /dev/null +++ b/misc/Obsoleted/configs/16z/src/z16f_leds.c @@ -0,0 +1,175 @@ +/**************************************************************************** + * configs/16z/z16f_leds.c + * + * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/* LEDs + * + * The 16z board has 7 LEDs, five of which are controllable via software: + * + * ----- ------ ------ ------------------------------------ + * LED Color Signal Description + * ----- ------ ------ ------------------------------------ + * LED1 Red 3V3 Indicates the presence of +3.3V + * LED2 Red 5V Indicates the presence of +5V + + * LED3 Blue ~RF Controlled via PH2. Notes: 1, 2 + * LED4 Green ~SXM Controlled via PH3. Notes: 1, 3 + * LED5 Green ~SD1 Controlled via PJ0. Notes: 1, 4 + * LED6 Yellow ~SD2 Controlled via PJ4. Notes: 1, 5 + * LED7 Yellow ~SD0 Controlled via PJ7. Notes: 1, 6 + * ----- ------ ------ ------------------------------------ + * + * Note 1: Pulled high so a low output illuminates the LED. + * Note 2: PH2/~RF is also used by the RF transceiver, X2. That part is not + * populated on my board. + * Note 3: ~SXM is the chip select for the serial memory, U4. That part is + * not populated on my board. + * Note 4: ~SD1 is the chip select for the SD card 1, X11. + * Note 5: ~SD2 is the chip select for the SD card 2, X10. + * Note 6: ~SD0 is the chip select for the microSD 0, X12. + * + * In conclusion: None of the LEDs are available to indicate software status + * without potentially sacrificing board functionality. If the RF transceiver + * is not installed (CONFIG_16Z_RFTRANSCEIVER=n) and if LED support is + * requested (CONFIG_ARCH_LEDS), then LED3 will be used to indicate status: A + * solid color means that the board has boot successfully; flashing at a rate + * of approximately 2Hz indicates a software failure. + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/config.h> + +#include <arch/board/board.h> +#include "up_internal.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_led_initialize + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void board_led_initialize(void) +{ + /* All GPIO initialization is done in up_lowinit() */ +} + +/**************************************************************************** + * Name: board_led_on + ****************************************************************************/ + +void board_led_on(int led) +{ +#if defined(HAVE_16Z_LED3) || defined(HAVE_16Z_LED4) + /* The following operations must be atomic */ + + irqstate_t flags = irqsave(); + uint8_t regval = getreg8(Z16F_GPIOH_OUT); + +#ifdef HAVE_16Z_LED3 + /* LED3 is available at PH2 and illuminated by a low output */ + + if ((led & __LED3_BIT) != 0) + { + regval &= ~(1 << 2); + } +#endif + +#ifdef HAVE_16Z_LED4 + /* LED4 is available at PH3 and illuminated by a low output */ + + if ((led & __LED4_BIT) != 0) + { + regval &= ~(1 << 3); + } +#endif + + putreg8(regval, Z16F_GPIOH_OUT); + irqrestore(flags); +#endif +} + +/**************************************************************************** + * Name: board_led_off + ****************************************************************************/ + +void board_led_off(int led) +{ +#if defined(HAVE_16Z_LED3) || defined(HAVE_16Z_LED4) + /* The following operations must be atomic */ + + irqstate_t flags = irqsave(); + uint8_t regval = getreg8(Z16F_GPIOH_OUT); + +#ifdef HAVE_16Z_LED3 + /* LED3 is available at PH2 and illuminated by a low output */ + + if ((led & __LED3_BIT) != 0) + { + regval |= (1 << 2); + } +#endif + +#ifdef HAVE_16Z_LED4 + /* LED4 is available at PH3 and illuminated by a low output */ + + if ((led & __LED4_BIT) != 0) + { + regval |= (1 << 3); + } +#endif + + putreg8(regval, Z16F_GPIOH_OUT); + irqrestore(flags); +#endif +} + +#endif /* CONFIG_ARCH_LEDS */ diff --git a/misc/Obsoleted/configs/16z/src/z16f_lowinit.c b/misc/Obsoleted/configs/16z/src/z16f_lowinit.c new file mode 100644 index 000000000..a91980118 --- /dev/null +++ b/misc/Obsoleted/configs/16z/src/z16f_lowinit.c @@ -0,0 +1,300 @@ +/*************************************************************************** + * configs/16z/src/z16f_lowinit.c + * + * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> + * + * Based upon sample code included with the Zilog ZDS-II toolchain. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ***************************************************************************/ + +/*************************************************************************** + * Included Files + ***************************************************************************/ + +#include <nuttx/config.h> + +#include "chip/chip.h" + +/*************************************************************************** + * Pre-processor Definitions + ***************************************************************************/ + +/*************************************************************************** + * Private Functions + ***************************************************************************/ + +/*************************************************************************** + * Name: z16f_extcsinit + ***************************************************************************/ + +static void z16f_extcsinit(void) +{ + /* CS0 enabled, Data [0:7] + * Post Read: No wait states; Chip select: 1 wait state + */ + + putreg16(0x9001, Z16F_EXTCS0); + + /* CS1 enabled, Data [0:7] + * Post Read: No wait states; Chip select: 1 wait state + */ + + putreg16(0x9001, Z16F_EXTCS1); + + /* CS2 enabled, Data [0:7] + * Post Read: 1 wait state; Chip select: 1 wait state + */ + + putreg16(0x9011, Z16F_EXTCS2); + + /* CS3 enabled, Data [0:7] + * Post Read: 1 wait state; Chip select: 5 wait states + */ + + putreg16(0x9015, Z16F_EXTCS3); + + /* CS4 enabled, Data [0:7] + * Post Read: 1 wait state; Chip select: 5 wait states + */ + + putreg16(0x9015, Z16F_EXTCS4); + + /* CS5 enabled, Data [0:7] + * Post Read: 1 wait state; Chip select: 5 wait states + */ + + putreg16(0x9015, Z16F_EXTCS5); + + /* Enable the 8-bit external bus interface */ + + putreg8(0x40, Z16F_EXTCT); +} + +/*************************************************************************** + * Name: z16f_gpioinit + * + * Description: + * Configure board-specific GPIO usage here. Driver pin configurations + * are set in the associated device drivers (such as UART, SPI, I2C, + * etc.) and must be preserved. + * + ***************************************************************************/ + +static void z16f_gpioinit(void) +{ + /* NOTE: Here we assume that all ports are in the default reset state */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PA0/T0IN/T0OUT/DMA0REQ GP8 PS/2 / GPIO, Expansion slots + * PA1/T0OUT/DMA0ACK GP9 PS/2 / GPIO, Expansion slots + * PA2/DE0/FAULTY ~INTI Power section, RF transceiver (1) + * PA3/CTS0/FAULT0 ~INTX Expansion slots + * PA4/RXD0/CS1 RXD MAX3232D RS-232 + * PA5/TXD0/CS2 TXD MAX3232D RS-232 + * PA6/SCL/CS3 SCL RTC / UID, Expansion slots + * PA7/SDA/CS4 SDA RTC / UID, Expansion slots + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0x9f, Z16F_GPIOA_DD); /* Inputs: GP8, GP9, ~INTI, ~INTX, RXD, and SDA */ + putreg8(0x03, Z16F_GPIOA_HDE); /* High drive current: GP8 and GP9 */ + putreg8(0xf0, Z16F_GPIOA_AFL); /* RXD=Alt 1, TXD=Alt 1, SCL=Alt 1, SDA=Alt 1 */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PB0/ANA0/T0IN0 GP0 Expansion slots + * PB1/ANA1/T0IN1 GP1 Expansion slots + * PB2/ANA2/T0IN2 GP2 Expansion slots + * PB3/ANA3/OPOUT GP3 Expansion slots + * PB4/ANA4 GP4 Expansion slots + * PB5/ANA5 GP5 Expansion slots + * PB6/ANA6/OPINP/CINN GP6 Expansion slots + * PB7/ANA7/OPINN GP7 Expansion slots + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0xff, Z16F_GPIOB_DD); /* Inputs: all */ + putreg8(0xff, Z16F_GPIOB_HDE); /* High drive current: all */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PC0/T1IN/T1OUT/DMA1REQ/CINN GP10 PS/2 / GPIO, Expansion slots + * PC1/T1OUT/DMA1ACK/COMPOUT GP11 PS/2 / GPIO, Expansion slots + * PC2/SS/CS4 ~EXP Expansion slots + * PC3/SCK/DMA2REQ SCK FT800Q, Serial memory (1), RF Transceiver (1), + * Expansion slots, SD0, 1, and 2 + * PC4/MOSI/DMA2ACK MOSI FT800Q, Serial memory (1), RF Transceiver (1), + * Expansion slots, SD0, 1, and 2 + * PC5/MISO/CS5 MISO FT800Q, Serial memory (1), RF Transceiver (1), + * Expansion slots, SD0, 1, and 2 + * PC6/T2IN/T2OUT/PWMH0 ~CTS MAX3232D RS-232 + * PC7/T2OUT/PWML0 ~RTS MAX3232D RS-232, Power section (?) + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0x63, Z16F_GPIOC_DD); /* Inputs: GP10, GP11, MISO, and ~CTS */ + putreg8(0x03, Z16F_GPIOC_HDE); /* High drive current: GP10 and GP11 */ + putreg8(0x38, Z16F_GPIOC_AFL); /* SCK=Alt 1, MOSI=Alt 1, MISO=Alt 1 */ + putreg8(0x04, Z16F_GPIOC_OUT); /* ~EXP output high */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PD0/PWMH1/ADR20 A20 RAM, Expansion slots + * PD1/PWML1/ADR21 A21 RAM, Expansion slots + * PD2/PWMH2/ADR22 A22 RAM, Expansion slots + * PD3/DE1/ADR16 A16 RAM, Expansion slots + * PD4/RXD1/ADR18 A18 RAM, Expansion slots + * PD5/TXD1/ADR19 A19 RAM, Expansion slots + * PD6/CTS1/ADR17 A17 RAM, Expansion slots + * PD7/PWML2/ADR23 A23 Expansion slots + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0x00, Z16F_GPIOD_DD); /* Inputs: None */ + putreg8(0xff, Z16F_GPIOD_AFH); /* All=Alt 2 + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PE0/DATA0 D0 RAM, Expansion slots + * PE1/DATA1 D1 RAM, Expansion slots + * PE2/DATA2 D2 RAM, Expansion slots + * PE3/DATA3 D3 RAM, Expansion slots + * PE4/DATA4 D4 RAM, Expansion slots + * PE5/DATA5 D5 RAM, Expansion slots + * PE6/DATA6 D6 RAM, Expansion slots + * PE7/DATA7 D7 RAM, Expansion slots + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0xff, Z16F_GPIOE_DD); /* Inputs: all */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PF0/ADR0 A0 Expansion slots + * PF1/ADR1 A1 RAM, Expansion slots + * PF2/ADR2 A2 RAM, Expansion slots + * PF3/ADR3 A3 RAM, Expansion slots + * PF4/ADR4 A4 RAM, Expansion slots + * PF5/ADR5 A5 RAM, Expansion slots + * PF6/ADR6 A6 RAM, Expansion slots + * PF7/ADR7 A7 RAM, Expansion slots + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0x00, Z16F_GPIOF_DD); /* Inputs: None */ + putreg8(0xff, Z16F_GPIOF_AFL); /* All=Alt 1 */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PG0/ADR0 A8 RAM, Expansion slots + * PG1/ADR0 A9 RAM, Expansion slots + * PG2/ADR0 A10 RAM, Expansion slots + * PG3/ADR0 A11 RAM, Expansion slots + * PG4/ADR0 A12 RAM, Expansion slots + * PG5/ADR0 A13 RAM, Expansion slots + * PG6/ADR0 A14 RAM, Expansion slots + * PG7/ADR0 A15 RAM, Expansion slots + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0x00, Z16F_GPIOG_DD); /* Inputs: None */ + putreg8(0xff, Z16F_GPIOG_AFL); /* All=Alt 1 */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PH0/ANA8/WR ~WR RAM, Expansion slots + * PH1/ANA9/RD ~RD RAM, Expansion slots + * PH2/ANA10/CS0 ~RF LED3, RF transceiver, X2 (1) + * PH3/ANA11/CINP/WAIT ~SXM LED4, Chip select for the serial memory, U4 (1) + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0xf0, Z16F_GPIOH_DD); /* Inputs: None (PH4-PH7 undefined) */ + putreg8(0x03, Z16F_GPIOH_AFH); /*~WR=Alt2 ~RD=Alt 2 */ + putreg8(0x0c, Z16F_GPIOH_OUT); /* Output high: ~RF and ~SXM */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PJ0/DATA8 ~SD1 LED5, Chip select for the SD card 1, X11. + * PJ1/DATA9 ~DT1 Card detect for SD card 1 + * PJ2/DATA10 WP1 Write protect for SD card 1 + * PJ3/DATA11 EVE EVE chip select + * PJ4/DATA12 ~SD2 LED6, Chip select for the SD card 2, X10. + * PJ5/DATA13 ~DT2 Card detect for SD card 2 + * PJ6/DATA14 WP2 Write protect for SD card 2 + * PJ7/DATA15 ~SD0 LED7, Chip select for the microSD 0, X12. + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0x66, Z16F_GPIOJ_DD); /* Inputs: ~DT1, WP1, ~DT2, and WP2 */ + putreg8(0x99, Z16F_GPIOJ_OUT); /* Output high: ~SD1, EVE, ~SD2, ~SD0 */ + + /* --------------------------- ------ -------------------------------------------- + * GPIO SIGNAL On-Board Connections + * --------------------------- ------ -------------------------------------------- + * PK0/BHEN ~BHE RAM, Expansion slots + * PK1/BLEN ~BLE RAM, Expansion slots + * PK2/CS0 ~0000 Bottom RAM bank, Expansion slots + * PK3/CS1 ~8000 Top RAM bank, Expansion slots + * PK4/CS2 ~F000 Expansion slots + * PK5/CS3 ~FFC8 Expansion slots + * PK6/CS4 ~FFD0 Expansion slots + * PK7/CS5 ~FFD8 Expansion slots + * --------------------------- ------ -------------------------------------------- + */ + + putreg8(0x00, Z16F_GPIOK_DD); /* Inputs: None */ + putreg8(0xff, Z16F_GPIOK_AFL); /* All=Alt 1 */ +} + +/*************************************************************************** + * Public Functions + ***************************************************************************/ + +/*************************************************************************** + * Name: z16f_lowinit + ***************************************************************************/ + +void z16f_lowinit(void) +{ + z16f_extcsinit(); /* Configure external memory */ + z16f_gpioinit(); /* Configure board GPIOs */ +} |