Mostly style fixes

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7017 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
utzig 2014-07-08 18:59:30 +00:00
parent e655ac4cd8
commit 8b24baf454
2 changed files with 19 additions and 29 deletions

View File

@ -139,7 +139,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
case PAL_MODE_INPUT_ANALOG:
port->dir &= ~mask;
port->out &= ~mask;
break;
break;
case PAL_MODE_UNCONNECTED:
case PAL_MODE_INPUT_PULLUP:
port->dir &= ~mask;

View File

@ -140,91 +140,91 @@ typedef avr_gpio_registers_t *ioportid_t;
/**
* @brief GPIO port A identifier.
*/
#define IOPORT1 ((volatile avr_gpio_registers_t *)&PINA)
#define IOPORT1 ((volatile avr_gpio_registers_t *)&PINA)
#endif
#if defined(PORTB) || defined(__DOXYGEN__)
/**
* @brief GPIO port B identifier.
*/
#define IOPORT2 ((volatile avr_gpio_registers_t *)&PINB)
#define IOPORT2 ((volatile avr_gpio_registers_t *)&PINB)
#endif
#if defined(PORTC) || defined(__DOXYGEN__)
/**
* @brief GPIO port C identifier.
*/
#define IOPORT3 ((volatile avr_gpio_registers_t *)&PINC)
#define IOPORT3 ((volatile avr_gpio_registers_t *)&PINC)
#endif
#if defined(PORTD) || defined(__DOXYGEN__)
/**
* @brief GPIO port D identifier.
*/
#define IOPORT4 ((volatile avr_gpio_registers_t *)&PIND)
#define IOPORT4 ((volatile avr_gpio_registers_t *)&PIND)
#endif
#if defined(PORTE) || defined(__DOXYGEN__)
/**
* @brief GPIO port E identifier.
*/
#define IOPORT5 ((volatile avr_gpio_registers_t *)&PINE)
#define IOPORT5 ((volatile avr_gpio_registers_t *)&PINE)
#endif
#if defined(PORTF) || defined(__DOXYGEN__)
/**
* @brief GPIO port F identifier.
*/
#define IOPORT6 ((volatile avr_gpio_registers_t *)&PINF)
#define IOPORT6 ((volatile avr_gpio_registers_t *)&PINF)
#endif
#if defined(PORTG) || defined(__DOXYGEN__)
/**
* @brief GPIO port G identifier.
*/
#define IOPORT7 ((volatile avr_gpio_registers_t *)&PING)
#define IOPORT7 ((volatile avr_gpio_registers_t *)&PING)
#endif
#if defined(PORTH) || defined(__DOXYGEN__)
/**
* @brief GPIO port H identifier.
*/
#define IOPORT8 ((volatile avr_gpio_registers_t *)&PINH)
#define IOPORT8 ((volatile avr_gpio_registers_t *)&PINH)
#endif
#if defined(PORTJ) || defined(__DOXYGEN__)
/**
* @brief GPIO port J identifier.
*/
#define IOPORT9 ((volatile avr_gpio_registers_t *)&PINJ)
#define IOPORT9 ((volatile avr_gpio_registers_t *)&PINJ)
#endif
#if defined(PORTK) || defined(__DOXYGEN__)
/**
* @brief GPIO port K identifier.
*/
#define IOPORT10 ((volatile avr_gpio_registers_t *)&PINK)
#define IOPORT10 ((volatile avr_gpio_registers_t *)&PINK)
#endif
#if defined(PORTL) || defined(__DOXYGEN__)
/**
* @brief GPIO port L identifier.
*/
#define IOPORT11 ((volatile avr_gpio_registers_t *)&PINL)
#define IOPORT11 ((volatile avr_gpio_registers_t *)&PINL)
#endif
#if defined(PORTADC) || defined(__DOXYGEN__)
/**
* @brief GPIO port ADC identifier.
*/
#define IOPORTADC ((volatile avr_gpio_registers_t *)&PINADC)
#define IOPORTADC ((volatile avr_gpio_registers_t *)&PINADC)
#endif
#if defined(PORT_SPI1) || defined(__DOXYGEN__)
/**
* @brief GPIO port SPI1 identifier.
*/
#define IOPORTSPI1 ((volatile avr_gpio_registers_t *)&PIN_SPI1)
#define IOPORTSPI1 ((volatile avr_gpio_registers_t *)&PIN_SPI1)
#endif
@ -298,14 +298,9 @@ typedef avr_gpio_registers_t *ioportid_t;
*
* @notapi
*/
#define pal_lld_setpad(port, pad) \
__asm__ __volatile__ \
( \
"sbi %0,%1\n\t" \
: \
: "I" (_SFR_IO_ADDR(port->out)), \
"I" (pad) \
\
#define pal_lld_setpad(port, pad) \
__asm__ __volatile__( \
"sbi %0,%1\n\t" :: "I" (_SFR_IO_ADDR(port->out)), "I" (pad) \
)
/**
@ -317,13 +312,8 @@ __asm__ __volatile__ \
* @notapi
*/
#define pal_lld_clearpad(port, pad) \
__asm__ __volatile__ \
( \
"cbi %0,%1\n\t" \
: \
: "I" (_SFR_IO_ADDR(port->out)), \
"I" (pad) \
\
__asm__ __volatile__( \
"cbi %0,%1\n\t" :: "I" (_SFR_IO_ADDR(port->out)), "I" (pad) \
)
extern ROMCONST PALConfig pal_default_config;