[AVR] Let compiler optimized set/clear pad
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9266 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
2b82c893e2
commit
9e0760fdc4
|
@ -299,9 +299,7 @@ typedef volatile 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) \
|
||||
)
|
||||
port->out |= _BV(pad)
|
||||
|
||||
/**
|
||||
* @brief Clears a pad logical state to @p PAL_LOW.
|
||||
|
@ -312,9 +310,7 @@ __asm__ __volatile__( \
|
|||
* @notapi
|
||||
*/
|
||||
#define pal_lld_clearpad(port, pad) \
|
||||
__asm__ __volatile__( \
|
||||
"cbi %0,%1\n\t" :: "I" (_SFR_IO_ADDR(port->out)), "I" (pad) \
|
||||
)
|
||||
port->out &= ~_BV(pad)
|
||||
|
||||
extern ROMCONST PALConfig pal_default_config;
|
||||
|
||||
|
|
Loading…
Reference in New Issue