[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:
Fabio Utzig 2016-04-09 21:47:19 +00:00
parent 2b82c893e2
commit 9e0760fdc4
1 changed files with 2 additions and 6 deletions

View File

@ -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;