Microchip® Advanced Software Framework

led.c File Reference

SAM3X-EK LEDs support package.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "board.h"
#include "led.h"
#include "gpio.h"

Data Structures

struct  tLED_DESCRIPTOR
 

Macros

#define ACTIVE_LEVEL_IS_HIGH   1
 
#define INSERT_LED_DESCRIPTOR(LED_NO, unused)
 

Functions

void LED_Off (uint32_t led_gpio)
 Turns off the specified LEDs. More...
 
void LED_On (uint32_t led_gpio)
 Turns on the specified LEDs. More...
 

Variables

static tLED_DESCRIPTOR LED_DESCRIPTOR [BOARD_NUM_OF_LED]
 Hardware descriptors of all LEDs. More...
 

#define ACTIVE_LEVEL_IS_HIGH   1

Referenced by LED_Off(), and LED_On().

#define INSERT_LED_DESCRIPTOR (   LED_NO,
  unused 
)
Value:
{ \
LED##LED_NO##_GPIO, LED##LED_NO##_ACTIVE_LEVEL \
},

void LED_Off ( uint32_t  led_gpio)

Turns off the specified LEDs.

Parameters
led_gpioLED to turn off (LEDx_GPIO).
Note
The pins of the specified LEDs are set to GPIO output mode.

References ACTIVE_LEVEL_IS_HIGH, BOARD_NUM_OF_LED, gpio_set_pin_high, and gpio_set_pin_low.

void LED_On ( uint32_t  led_gpio)

Turns on the specified LEDs.

Parameters
led_gpioLED to turn on (LEDx_GPIO).
Note
The pins of the specified LEDs are set to GPIO output mode.

References ACTIVE_LEVEL_IS_HIGH, BOARD_NUM_OF_LED, gpio_set_pin_high, and gpio_set_pin_low.

tLED_DESCRIPTOR LED_DESCRIPTOR[BOARD_NUM_OF_LED]
static
Initial value:
=
{
#define INSERT_LED_DESCRIPTOR(LED_NO, unused)
}

Hardware descriptors of all LEDs.