Microprocessor 2 Labs v2.0
Microprocessor 2 Lab Documenation
Loading...
Searching...
No Matches
led.c File Reference

Custom LED driver source file. More...

#include "driver/led.h"
#include "driver/gpio.h"
#include "esp_idf_version.h"
Include dependency graph for led.c:

Macros

#define LED_LOW   0
 
#define LED_HIGH   1
 

Functions

void led_enable (led_t *const led)
 LED enable.
 
void led_on (led_t *const led)
 Turn on LED object pin.
 
void led_off (led_t *const led)
 Turn off LED object pin.
 
void led_toggle (led_t *const led)
 Toggle LED object pin.
 

Detailed Description

Custom LED driver source file.

Author
Jesus Minjares (https://github.com/jminjares4)
Version
0.1
Date
2022-07-25

Macro Definition Documentation

◆ LED_HIGH

#define LED_HIGH   1

LED high logic

◆ LED_LOW

#define LED_LOW   0

LED low logic

Function Documentation

◆ led_enable()

void led_enable ( led_t *const led)

LED enable.

Parameters
ledpointer to LED object
Note
The function assume that the user has initialize the members of the object.
Returns
None

◆ led_off()

void led_off ( led_t *const led)

Turn off LED object pin.

Parameters
ledpointer to LED object
Note
Function will update the state of LED
Returns
None

◆ led_on()

void led_on ( led_t *const led)

Turn on LED object pin.

Parameters
ledpointer to LED object
Note
Function will update the state of LED
Returns
None

◆ led_toggle()

void led_toggle ( led_t *const led)

Toggle LED object pin.

Parameters
ledpointer to LED object
Note
Function will update the state of LED
Returns
None