Elevator v2.0
Elevator Documenation
Loading...
Searching...
No Matches
led.h File Reference

Hardware Application Layer for any LEDs. More...

#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
Include dependency graph for led.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Led
 This is a custom library for easy use of Led without the struggle of doing all the hardware intializatio and selection. More...
 

Macros

#define HIGH   1
 
#define LOW   0
 
#define ONBOARD_LED   2
 

Typedefs

typedef enum state_t state_t
 

Enumerations

enum  state_t { LED_OFF = 0 , LED_ON = 1 }
 led.h More...
 

Functions

void ledInit (Led *led)
 Led initialization for any led. More...
 
void ledOn (Led *led)
 ledOn will set high the instance of the led More...
 
void ledOff (Led *led)
 ledOff will set low the instance of the led More...
 
void ledAllOff (Led *led, int size)
 

Detailed Description

Hardware Application Layer for any LEDs.

Author
Jesus Minjares (https://github.com/jminjares4)
Version
0.1
Date
2021-11-27

Macro Definition Documentation

◆ HIGH

#define HIGH   1

◆ LOW

#define LOW   0

◆ ONBOARD_LED

#define ONBOARD_LED   2

Typedef Documentation

◆ state_t

typedef enum state_t state_t

Enumeration Type Documentation

◆ state_t

enum state_t

led.h

Led struct for any outputs

Enumeration of the led state

Example

typedef enum {
LED_OFF = 0, // OFF
LED_ON = 1, // ON
state_t
led.h
Definition: led.h:44
@ LED_ON
Definition: led.h:46
@ LED_OFF
Definition: led.h:45
Enumerator
LED_OFF 

led off

LED_ON 

led on

Function Documentation

◆ ledAllOff()

void ledAllOff ( Led led,
int  size 
)

◆ ledInit()

void ledInit ( Led led)

Led initialization for any led.

Parameters
ledpass a Led by reference
Returns
None
Parameters
ledpass a Led by reference
Returns
None

◆ ledOff()

void ledOff ( Led led)

ledOff will set low the instance of the led

Parameters
ledpass a Led by reference
Note
None
ledOn will change the state of the led
See also
state
Parameters
ledpass a Led by reference
Note
None
ledOn will change the state of the led
See also
state

◆ ledOn()

void ledOn ( Led led)

ledOn will set high the instance of the led

Parameters
ledpass a Led by reference
Returns
None
Note
ledOn will change the state of the led
See also
state
Parameters
ledpass a Led by reference
Returns
None
Note
ledOn will change the state of the led
See also
state