bsp/lpc24xx: Add lpc24xx_pin_get_first_index()

This commit is contained in:
Sebastian Huber
2014-02-21 14:03:50 +01:00
parent 0bf59cf0ae
commit 986ddf50c2

View File

@@ -294,6 +294,16 @@ rtems_status_code lpc24xx_pin_config(
lpc24xx_pin_action action
);
/**
* @brief Returns the first pin index of a pin range.
*/
static inline unsigned lpc24xx_pin_get_first_index(
const lpc24xx_pin_range *range
)
{
return LPC24XX_IO_INDEX_BY_PORT(range->fields.port, range->fields.port_bit);
}
/**
* @name ADC Pins
*