git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1928 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-05-16 12:17:39 +00:00
parent ce50d026fc
commit b5b34a5b9b
5 changed files with 26 additions and 4 deletions

View File

@ -87,7 +87,17 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask,
uint_fast8_t mode) {
(void)port; (void)mask; (void)mode;
switch (mode & PAL_MODE_MASK) {
case PAL_MODE_RESET:
case PAL_MODE_INPUT:
port->DIR &= ~mask;
break;
case PAL_MODE_UNCONNECTED:
palSetPort(port, PAL_WHOLE_PORT);
case PAL_MODE_OUTPUT_PUSHPULL:
port->DIR |= mask;
break;
}
}
#endif /* CH_HAL_USE_PAL */

View File

@ -85,7 +85,7 @@ typedef struct {
* @brief Whole port mask.
* @brief This macro specifies all the valid bits into a port.
*/
#define PAL_WHOLE_PORT ((ioportmask_t)0xFFFFFFFF)
#define PAL_WHOLE_PORT ((ioportmask_t)0xFFF)
/**
* @brief Digital I/O port sized unsigned type.

View File

@ -87,7 +87,17 @@ void _pal_lld_setgroupmode(ioportid_t port,
ioportmask_t mask,
uint_fast8_t mode) {
(void)port; (void)mask; (void)mode;
switch (mode & PAL_MODE_MASK) {
case PAL_MODE_RESET:
case PAL_MODE_INPUT:
port->DIR &= ~mask;
break;
case PAL_MODE_UNCONNECTED:
palSetPort(port, PAL_WHOLE_PORT);
case PAL_MODE_OUTPUT_PUSHPULL:
port->DIR |= mask;
break;
}
}
#endif /* CH_HAL_USE_PAL */

View File

@ -85,7 +85,7 @@ typedef struct {
* @brief Whole port mask.
* @brief This macro specifies all the valid bits into a port.
*/
#define PAL_WHOLE_PORT ((ioportmask_t)0xFFFFFFFF)
#define PAL_WHOLE_PORT ((ioportmask_t)0xFFF)
/**
* @brief Digital I/O port sized unsigned type.

View File

@ -70,6 +70,8 @@
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.
- NEW: Added the palSetBusMode() capability to the LPC11xx and LPC13xx
PAL drivers.
- 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).