HRI board firmware v2.1 Microcontroller firmware of the board used during the HRI labs.

Data Structures | Macros | Functions | Variables
led.c File Reference
`#include "led.h"`
`#include "../communication.h"`

## Data Structures
struct | led_Led

## Macros
#define | N_LEDS 4
#define | LED_TIMER TIM1
#define | LED_PORT GPIOA
#define | LED_MAX_DUTY 255
#define | LED_PWM_FREQ 32000

## Functions
void | setLed0 (float32_t brightness)
void | setLed1 (float32_t brightness)
void | setLed2 (float32_t brightness)
void | setLed3 (float32_t brightness)
float32_t | getLed0 (void)
float32_t | getLed1 (void)
float32_t | getLed2 (void)
float32_t | getLed3 (void)
void | led_Init (void)
| Initializes the LEDs module. More...
float32_t | led_Get (int ledIndex)
| Gets the intensity of a single LED. More...
void | led_Set (int ledIndex, float32_t brightness)
| Sets the intensity of a single LED. More...

## Variables
led_Led | led_leds [N_LEDS]

## Macro Definition Documentation

## ◆ LED_MAX_DUTY

#define LED_MAX_DUTY 255

## ◆ LED_PORT

#define LED_PORT GPIOA

## ◆ LED_PWM_FREQ

#define LED_PWM_FREQ 32000

## ◆ LED_TIMER

#define LED_TIMER TIM1

## ◆ N_LEDS

#define N_LEDS 4

## Function Documentation

## ◆ getLed0()

float32_t getLed0 | ( | void |  | ) |

## ◆ getLed1()

float32_t getLed1 | ( | void |  | ) |

## ◆ getLed2()

float32_t getLed2 | ( | void |  | ) |

## ◆ getLed3()

float32_t getLed3 | ( | void |  | ) |

## ◆ setLed0()

void setLed0 | ( | float32_t | brightness | ) |

## ◆ setLed1()

void setLed1 | ( | float32_t | brightness | ) |

## ◆ setLed2()

void setLed2 | ( | float32_t | brightness | ) |

## ◆ setLed3()

void setLed3 | ( | float32_t | brightness | ) |

## Variable Documentation

## ◆ led_leds

led_Led led_leds[N_LEDS]

Initial value:
=
{
{ GPIO_Pin_8, GPIO_PinSource8, &LED_TIMER->CCR1 },
{ GPIO_Pin_9, GPIO_PinSource9, &LED_TIMER->CCR2 },
{ GPIO_Pin_10, GPIO_PinSource10, &LED_TIMER->CCR3 },
{ GPIO_Pin_11, GPIO_PinSource11, &LED_TIMER->CCR4 },
}
LED_TIMER
#define LED_TIMER
Definition: led.c:22