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
This commit is contained in:
parent
0b24320bdd
commit
47e54f5042
|
@ -39,7 +39,7 @@
|
||||||
* @brief PAL setup.
|
* @brief PAL setup.
|
||||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
* @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},
|
{VAL_PIOA_ODSR, VAL_PIOA_OSR, VAL_PIOA_PUSR},
|
||||||
#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
|
#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
*
|
*
|
||||||
* @param[in] config the AT91SAM7 ports configuration
|
* @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);
|
uint32_t ports = (1 << AT91C_ID_PIOA);
|
||||||
#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
|
#if (SAM7_PLATFORM == SAM7X128) || (SAM7_PLATFORM == SAM7X256) || \
|
||||||
|
|
|
@ -66,7 +66,7 @@ typedef struct {
|
||||||
/** @brief Port 1 setup data.*/
|
/** @brief Port 1 setup data.*/
|
||||||
at91sam7_pio_setup_t P1Data;
|
at91sam7_pio_setup_t P1Data;
|
||||||
#endif
|
#endif
|
||||||
} AT91SAM7PIOConfig;
|
} PALConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Width, in bits, of an I/O port.
|
* @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)
|
#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
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
void _pal_lld_init(const AT91SAM7PIOConfig *config);
|
void _pal_lld_init(const PALConfig *config);
|
||||||
void _pal_lld_setgroupmode(ioportid_t port,
|
void _pal_lld_setgroupmode(ioportid_t port,
|
||||||
ioportmask_t mask,
|
ioportmask_t mask,
|
||||||
uint_fast8_t mode);
|
uint_fast8_t mode);
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
* @brief PAL setup.
|
* @brief PAL setup.
|
||||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
* @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_PINSEL0,
|
||||||
VAL_PINSEL1,
|
VAL_PINSEL1,
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
*
|
*
|
||||||
* @param[in] config the LPC214x ports configuration
|
* @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.*/
|
/* Enables the access through the fast registers.*/
|
||||||
SCS = 3;
|
SCS = 3;
|
||||||
|
|
|
@ -69,7 +69,7 @@ typedef struct {
|
||||||
lpc214x_fio_setup_t P0Data;
|
lpc214x_fio_setup_t P0Data;
|
||||||
/** @brief Port 1 setup data.*/
|
/** @brief Port 1 setup data.*/
|
||||||
lpc214x_fio_setup_t P1Data;
|
lpc214x_fio_setup_t P1Data;
|
||||||
} LPC214xFIOConfig;
|
} PALConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Width, in bits, of an I/O port.
|
* @brief Width, in bits, of an I/O port.
|
||||||
|
@ -237,12 +237,12 @@ typedef FIO * ioportid_t;
|
||||||
(port)->FIO_DIR = (dir); \
|
(port)->FIO_DIR = (dir); \
|
||||||
}
|
}
|
||||||
|
|
||||||
extern const LPC214xFIOConfig pal_default_config;
|
extern const PALConfig pal_default_config;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
void _pal_lld_init(const LPC214xFIOConfig *config);
|
void _pal_lld_init(const PALConfig *config);
|
||||||
void _pal_lld_setgroupmode(ioportid_t port,
|
void _pal_lld_setgroupmode(ioportid_t port,
|
||||||
ioportmask_t mask,
|
ioportmask_t mask,
|
||||||
uint_fast8_t mode);
|
uint_fast8_t mode);
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
* @brief PAL setup.
|
* @brief PAL setup.
|
||||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
* @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__)
|
#if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__)
|
||||||
{VAL_P1OUT, VAL_P1DIR},
|
{VAL_P1OUT, VAL_P1DIR},
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
* @note The @p PxIFG, @p PxIE and @p PxSEL registers are cleared. @p PxOUT
|
* @note The @p PxIFG, @p PxIE and @p PxSEL registers are cleared. @p PxOUT
|
||||||
* and @p PxDIR are configured as specified.
|
* 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__)
|
#if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__)
|
||||||
IOPORT1->iop_full.ie.reg_p = 0;
|
IOPORT1->iop_full.ie.reg_p = 0;
|
||||||
|
|
|
@ -114,7 +114,7 @@ typedef struct {
|
||||||
/** @brief Port 6 setup data.*/
|
/** @brief Port 6 setup data.*/
|
||||||
msp430_dio_setup_t P6Data;
|
msp430_dio_setup_t P6Data;
|
||||||
#endif
|
#endif
|
||||||
} MSP430DIOConfig;
|
} PALConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Width, in bits, of an I/O port.
|
* @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) \
|
#define pal_lld_setgroupmode(port, mask, mode) \
|
||||||
_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
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
void _pal_lld_init(const MSP430DIOConfig *config);
|
void _pal_lld_init(const PALConfig *config);
|
||||||
void _pal_lld_setgroupmode(ioportid_t port,
|
void _pal_lld_setgroupmode(ioportid_t port,
|
||||||
ioportmask_t mask,
|
ioportmask_t mask,
|
||||||
uint_fast8_t mode);
|
uint_fast8_t mode);
|
||||||
|
|
|
@ -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.
|
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||||
*/
|
*/
|
||||||
#if CH_HAL_USE_PAL || defined(__DOXYGEN__)
|
#if CH_HAL_USE_PAL || defined(__DOXYGEN__)
|
||||||
const VIOConfig pal_default_config = {
|
const PALConfig pal_default_config = {
|
||||||
{0, 0, 0},
|
{0, 0, 0},
|
||||||
{0, 0, 0}
|
{0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,7 +81,7 @@ typedef struct {
|
||||||
* @brief Virtual port 2 setup data.
|
* @brief Virtual port 2 setup data.
|
||||||
*/
|
*/
|
||||||
sim_vio_port_t VP2Data;
|
sim_vio_port_t VP2Data;
|
||||||
} VIOConfig;
|
} PALConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Width, in bits, of an I/O port.
|
* @brief Width, in bits, of an I/O port.
|
||||||
|
@ -183,7 +183,7 @@ typedef sim_vio_port_t *ioportid_t;
|
||||||
#if !defined(__DOXYGEN__)
|
#if !defined(__DOXYGEN__)
|
||||||
extern sim_vio_port_t vio_port_1;
|
extern sim_vio_port_t vio_port_1;
|
||||||
extern sim_vio_port_t vio_port_2;
|
extern sim_vio_port_t vio_port_2;
|
||||||
extern const VIOConfig pal_default_config;
|
extern const PALConfig pal_default_config;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -43,7 +43,7 @@ static LARGE_INTEGER slice;
|
||||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||||
*/
|
*/
|
||||||
#if CH_HAL_USE_PAL || defined(__DOXYGEN__)
|
#if CH_HAL_USE_PAL || defined(__DOXYGEN__)
|
||||||
const VIOConfig pal_default_config = {
|
const PALConfig pal_default_config = {
|
||||||
{0, 0, 0},
|
{0, 0, 0},
|
||||||
{0, 0, 0}
|
{0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,7 +81,7 @@ typedef struct {
|
||||||
* @brief Virtual port 2 setup data.
|
* @brief Virtual port 2 setup data.
|
||||||
*/
|
*/
|
||||||
sim_vio_port_t VP2Data;
|
sim_vio_port_t VP2Data;
|
||||||
} VIOConfig;
|
} PALConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Width, in bits, of an I/O port.
|
* @brief Width, in bits, of an I/O port.
|
||||||
|
@ -183,7 +183,7 @@ typedef sim_vio_port_t *ioportid_t;
|
||||||
#if !defined(__DOXYGEN__)
|
#if !defined(__DOXYGEN__)
|
||||||
extern sim_vio_port_t vio_port_1;
|
extern sim_vio_port_t vio_port_1;
|
||||||
extern sim_vio_port_t vio_port_2;
|
extern sim_vio_port_t vio_port_2;
|
||||||
extern const VIOConfig pal_default_config;
|
extern const PALConfig pal_default_config;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -70,9 +70,9 @@
|
||||||
in the board.h file, there is no more the need to put -DSTM32F10X_xx into
|
in the board.h file, there is no more the need to put -DSTM32F10X_xx into
|
||||||
the makefile.
|
the makefile.
|
||||||
- NEW: Added the palSetBusMode() capability to the STM8 PAL driver.
|
- NEW: Added the palSetBusMode() capability to the STM8 PAL driver.
|
||||||
- CHANGE: Renamed the STM32 and STM8 PAL configuration structures to
|
- CHANGE: Renamed the STM32, STM8, LPC214x, AT91SAM7x, MSP430 and simulators
|
||||||
PALConfig, it is better to have the same name for this structure in
|
PAL configuration structures to PALConfig, it is better to have the same
|
||||||
all ports.
|
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
|
- 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
|
the new compiler shows a general performance regression except in one
|
||||||
test case.
|
test case.
|
||||||
|
|
Loading…
Reference in New Issue