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