From 47e54f50428812f57c8ed5f25ef184dbe8ccd6c0 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 14 May 2010 10:46:26 +0000 Subject: [PATCH] Renamed all the PAL configuration structures to PALConfig. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1923 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/AT91SAM7/hal_lld.c | 2 +- os/hal/platforms/AT91SAM7/pal_lld.c | 2 +- os/hal/platforms/AT91SAM7/pal_lld.h | 6 +++--- os/hal/platforms/LPC214x/hal_lld.c | 2 +- os/hal/platforms/LPC214x/pal_lld.c | 2 +- os/hal/platforms/LPC214x/pal_lld.h | 6 +++--- os/hal/platforms/MSP430/hal_lld.c | 2 +- os/hal/platforms/MSP430/pal_lld.c | 2 +- os/hal/platforms/MSP430/pal_lld.h | 6 +++--- os/hal/platforms/Posix/hal_lld.c | 2 +- os/hal/platforms/Posix/pal_lld.h | 4 ++-- os/hal/platforms/Win32/hal_lld.c | 2 +- os/hal/platforms/Win32/pal_lld.h | 4 ++-- readme.txt | 6 +++--- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/os/hal/platforms/AT91SAM7/hal_lld.c b/os/hal/platforms/AT91SAM7/hal_lld.c index a9012f186..841a4d2d7 100644 --- a/os/hal/platforms/AT91SAM7/hal_lld.c +++ b/os/hal/platforms/AT91SAM7/hal_lld.c @@ -39,7 +39,7 @@ * @brief PAL setup. * @details Digital I/O ports static configuration as defined in @p board.h. */ -const AT91SAM7PIOConfig pal_default_config = +const PALConfig pal_default_config = { {VAL_PIOA_ODSR, VAL_PIOA_OSR, VAL_PIOA_PUSR}, #if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \ diff --git a/os/hal/platforms/AT91SAM7/pal_lld.c b/os/hal/platforms/AT91SAM7/pal_lld.c index b91ec9348..3ea061f07 100644 --- a/os/hal/platforms/AT91SAM7/pal_lld.c +++ b/os/hal/platforms/AT91SAM7/pal_lld.c @@ -55,7 +55,7 @@ * * @param[in] config the AT91SAM7 ports configuration */ -void _pal_lld_init(const AT91SAM7PIOConfig *config) { +void _pal_lld_init(const PALConfig *config) { uint32_t ports = (1 << AT91C_ID_PIOA); #if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \ diff --git a/os/hal/platforms/AT91SAM7/pal_lld.h b/os/hal/platforms/AT91SAM7/pal_lld.h index ef143dac5..607cc040c 100644 --- a/os/hal/platforms/AT91SAM7/pal_lld.h +++ b/os/hal/platforms/AT91SAM7/pal_lld.h @@ -66,7 +66,7 @@ typedef struct { /** @brief Port 1 setup data.*/ at91sam7_pio_setup_t P1Data; #endif -} AT91SAM7PIOConfig; +} PALConfig; /** * @brief Width, in bits, of an I/O port. @@ -235,12 +235,12 @@ typedef AT91PS_PIO ioportid_t; */ #define pal_lld_writepad(port, pad, bit) pal_lld_writegroup(port, 1, pad, bit) -extern const AT91SAM7PIOConfig pal_default_config; +extern const PALConfig pal_default_config; #ifdef __cplusplus extern "C" { #endif - void _pal_lld_init(const AT91SAM7PIOConfig *config); + void _pal_lld_init(const PALConfig *config); void _pal_lld_setgroupmode(ioportid_t port, ioportmask_t mask, uint_fast8_t mode); diff --git a/os/hal/platforms/LPC214x/hal_lld.c b/os/hal/platforms/LPC214x/hal_lld.c index b7520f6a6..1deac96fb 100644 --- a/os/hal/platforms/LPC214x/hal_lld.c +++ b/os/hal/platforms/LPC214x/hal_lld.c @@ -39,7 +39,7 @@ * @brief PAL setup. * @details Digital I/O ports static configuration as defined in @p board.h. */ -const LPC214xFIOConfig pal_default_config = +const PALConfig pal_default_config = { VAL_PINSEL0, VAL_PINSEL1, diff --git a/os/hal/platforms/LPC214x/pal_lld.c b/os/hal/platforms/LPC214x/pal_lld.c index 33838063c..bc563be28 100644 --- a/os/hal/platforms/LPC214x/pal_lld.c +++ b/os/hal/platforms/LPC214x/pal_lld.c @@ -55,7 +55,7 @@ * * @param[in] config the LPC214x ports configuration */ -void _pal_lld_init(const LPC214xFIOConfig *config) { +void _pal_lld_init(const PALConfig *config) { /* Enables the access through the fast registers.*/ SCS = 3; diff --git a/os/hal/platforms/LPC214x/pal_lld.h b/os/hal/platforms/LPC214x/pal_lld.h index 259fdfe30..4a0ca5106 100644 --- a/os/hal/platforms/LPC214x/pal_lld.h +++ b/os/hal/platforms/LPC214x/pal_lld.h @@ -69,7 +69,7 @@ typedef struct { lpc214x_fio_setup_t P0Data; /** @brief Port 1 setup data.*/ lpc214x_fio_setup_t P1Data; -} LPC214xFIOConfig; +} PALConfig; /** * @brief Width, in bits, of an I/O port. @@ -237,12 +237,12 @@ typedef FIO * ioportid_t; (port)->FIO_DIR = (dir); \ } -extern const LPC214xFIOConfig pal_default_config; +extern const PALConfig pal_default_config; #ifdef __cplusplus extern "C" { #endif - void _pal_lld_init(const LPC214xFIOConfig *config); + void _pal_lld_init(const PALConfig *config); void _pal_lld_setgroupmode(ioportid_t port, ioportmask_t mask, uint_fast8_t mode); diff --git a/os/hal/platforms/MSP430/hal_lld.c b/os/hal/platforms/MSP430/hal_lld.c index c02957014..490c0f505 100644 --- a/os/hal/platforms/MSP430/hal_lld.c +++ b/os/hal/platforms/MSP430/hal_lld.c @@ -35,7 +35,7 @@ * @brief PAL setup. * @details Digital I/O ports static configuration as defined in @p board.h. */ -const MSP430DIOConfig pal_default_config = +const PALConfig pal_default_config = { #if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__) {VAL_P1OUT, VAL_P1DIR}, diff --git a/os/hal/platforms/MSP430/pal_lld.c b/os/hal/platforms/MSP430/pal_lld.c index 4786261f0..9a8cf5605 100644 --- a/os/hal/platforms/MSP430/pal_lld.c +++ b/os/hal/platforms/MSP430/pal_lld.c @@ -57,7 +57,7 @@ * @note The @p PxIFG, @p PxIE and @p PxSEL registers are cleared. @p PxOUT * and @p PxDIR are configured as specified. */ -void _pal_lld_init(const MSP430DIOConfig *config) { +void _pal_lld_init(const PALConfig *config) { #if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__) IOPORT1->iop_full.ie.reg_p = 0; diff --git a/os/hal/platforms/MSP430/pal_lld.h b/os/hal/platforms/MSP430/pal_lld.h index e52589e55..24c48d320 100644 --- a/os/hal/platforms/MSP430/pal_lld.h +++ b/os/hal/platforms/MSP430/pal_lld.h @@ -114,7 +114,7 @@ typedef struct { /** @brief Port 6 setup data.*/ msp430_dio_setup_t P6Data; #endif -} MSP430DIOConfig; +} PALConfig; /** * @brief Width, in bits, of an I/O port. @@ -277,12 +277,12 @@ typedef union __ioport * ioportid_t; #define pal_lld_setgroupmode(port, mask, mode) \ _pal_lld_setgroupmode(port, mask, mode) -extern const MSP430DIOConfig pal_default_config; +extern const PALConfig pal_default_config; #ifdef __cplusplus extern "C" { #endif - void _pal_lld_init(const MSP430DIOConfig *config); + void _pal_lld_init(const PALConfig *config); void _pal_lld_setgroupmode(ioportid_t port, ioportmask_t mask, uint_fast8_t mode); diff --git a/os/hal/platforms/Posix/hal_lld.c b/os/hal/platforms/Posix/hal_lld.c index b3d32d6de..6d25f7aea 100644 --- a/os/hal/platforms/Posix/hal_lld.c +++ b/os/hal/platforms/Posix/hal_lld.c @@ -48,7 +48,7 @@ static struct timeval tick = {0, 1000000 / CH_FREQUENCY}; * @details Digital I/O ports static configuration as defined in @p board.h. */ #if CH_HAL_USE_PAL || defined(__DOXYGEN__) -const VIOConfig pal_default_config = { +const PALConfig pal_default_config = { {0, 0, 0}, {0, 0, 0} }; diff --git a/os/hal/platforms/Posix/pal_lld.h b/os/hal/platforms/Posix/pal_lld.h index cb78442e4..07de81c65 100644 --- a/os/hal/platforms/Posix/pal_lld.h +++ b/os/hal/platforms/Posix/pal_lld.h @@ -81,7 +81,7 @@ typedef struct { * @brief Virtual port 2 setup data. */ sim_vio_port_t VP2Data; -} VIOConfig; +} PALConfig; /** * @brief Width, in bits, of an I/O port. @@ -183,7 +183,7 @@ typedef sim_vio_port_t *ioportid_t; #if !defined(__DOXYGEN__) extern sim_vio_port_t vio_port_1; extern sim_vio_port_t vio_port_2; -extern const VIOConfig pal_default_config; +extern const PALConfig pal_default_config; #endif #ifdef __cplusplus diff --git a/os/hal/platforms/Win32/hal_lld.c b/os/hal/platforms/Win32/hal_lld.c index e037c9c83..afbbae39e 100644 --- a/os/hal/platforms/Win32/hal_lld.c +++ b/os/hal/platforms/Win32/hal_lld.c @@ -43,7 +43,7 @@ static LARGE_INTEGER slice; * @details Digital I/O ports static configuration as defined in @p board.h. */ #if CH_HAL_USE_PAL || defined(__DOXYGEN__) -const VIOConfig pal_default_config = { +const PALConfig pal_default_config = { {0, 0, 0}, {0, 0, 0} }; diff --git a/os/hal/platforms/Win32/pal_lld.h b/os/hal/platforms/Win32/pal_lld.h index 8df8b3752..2c1955766 100644 --- a/os/hal/platforms/Win32/pal_lld.h +++ b/os/hal/platforms/Win32/pal_lld.h @@ -81,7 +81,7 @@ typedef struct { * @brief Virtual port 2 setup data. */ sim_vio_port_t VP2Data; -} VIOConfig; +} PALConfig; /** * @brief Width, in bits, of an I/O port. @@ -183,7 +183,7 @@ typedef sim_vio_port_t *ioportid_t; #if !defined(__DOXYGEN__) extern sim_vio_port_t vio_port_1; extern sim_vio_port_t vio_port_2; -extern const VIOConfig pal_default_config; +extern const PALConfig pal_default_config; #endif #ifdef __cplusplus diff --git a/readme.txt b/readme.txt index 0691c8588..52a409a2c 100644 --- a/readme.txt +++ b/readme.txt @@ -70,9 +70,9 @@ in the board.h file, there is no more the need to put -DSTM32F10X_xx into the makefile. - NEW: Added the palSetBusMode() capability to the STM8 PAL driver. -- CHANGE: Renamed the STM32 and STM8 PAL configuration structures to - PALConfig, it is better to have the same name for this structure in - all ports. +- CHANGE: Renamed the STM32, STM8, LPC214x, AT91SAM7x, MSP430 and simulators + PAL configuration structures to PALConfig, it is better to have the same + name for this structure in all ports (like for all the other drivers). - Tested the STM8 port with the latest RKit-STM8_2.28.10.0092. It works but the new compiler shows a general performance regression except in one test case.