diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-21 14:03:50 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-14 08:56:33 +0100 |
commit | 986ddf50c2c7328244110e8a47205400a26fda9d (patch) | |
tree | be4ae7f0144f2b068a8e82db52d2b3ed70441a91 /c | |
parent | Add documentation for profiling (diff) | |
download | rtems-986ddf50c2c7328244110e8a47205400a26fda9d.tar.bz2 |
bsp/lpc24xx: Add lpc24xx_pin_get_first_index()
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/arm/lpc24xx/include/io.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/lpc24xx/include/io.h b/c/src/lib/libbsp/arm/lpc24xx/include/io.h index 497d4a7b72..ade8545cd6 100644 --- a/c/src/lib/libbsp/arm/lpc24xx/include/io.h +++ b/c/src/lib/libbsp/arm/lpc24xx/include/io.h @@ -295,6 +295,16 @@ rtems_status_code lpc24xx_pin_config( ); /** + * @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 * * @{ |