rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board

Provides function to control onboard leds. More...

Functions

static void rflpc_led_init ()
 Inits the GPIO port to use the leds. More...
 
static void rflpc_led_set (uint32_t l)
 Turns the given led(s) on.
 
static void rflpc_led_clr (uint32_t l)
 Clears the given led(s) (turn them off)
 
static void rflpc_led_val (uint32_t l)
 Turns on the leds included in the mask.
 
static void rflpc_led_binary_value (uint8_t v)
 Turns the led to reflect a binary 4 digit number. More...
 

LEDs defines

This values can be used to set/clear leds in the driver functions

#define RFLPC_LED_1   (1 << RFLPC_PIN_GET_PIN(RFLPC_LED_1_PIN))
 LED 1.
 
#define RFLPC_LED_2   (1 << RFLPC_PIN_GET_PIN(RFLPC_LED_2_PIN))
 LED 2.
 
#define RFLPC_LED_3   (1 << RFLPC_PIN_GET_PIN(RFLPC_LED_3_PIN))
 LED 3.
 
#define RFLPC_LED_4   (1 << RFLPC_PIN_GET_PIN(RFLPC_LED_4_PIN))
 LED 4.
 

Detailed Description

Provides function to control onboard leds.

This driver only have sense if your board has 4 leds controlled by GPIO, which is the case for the MBED board

Function Documentation

static void rflpc_led_binary_value ( uint8_t  v)
inlinestatic

Turns the led to reflect a binary 4 digit number.

RFLPC_LED_4 is LSB, RFLPC_LED_1 MSB

Parameters
vThe value to display on the 4 leds

Definition at line 89 of file leds.h.

References RFLPC_LED_1, RFLPC_LED_2, RFLPC_LED_3, RFLPC_LED_4, and rflpc_led_val().

static void rflpc_led_init ( )
inlinestatic

Inits the GPIO port to use the leds.

pins

Definition at line 53 of file leds.h.

References rflpc_gpio_set_pin_mode_output(), RFLPC_LED_1_PIN, RFLPC_LED_2_PIN, RFLPC_LED_3_PIN, and RFLPC_LED_4_PIN.