~ruther/CTU-FEE-B0B35APO-Semestral-project

ref: 9f289a5b08da302d4c1a65c2fade4461ae9e848c CTU-FEE-B0B35APO-Semestral-project/lib-pheripherals/include/mzapo_led_strip.h -rw-r--r-- 672 bytes
9f289a5b — František Boháček feat: turn on red led on error 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __MZAPO_LED_STRIP_H__
#define __MZAPO_LED_STRIP_H__

#include <stdint.h>

#define LED_STRIP_COUNT 32

#ifdef __cplusplus
extern "C" {
#endif

  typedef struct {
    volatile uint32_t *mem_base;
    uint8_t load;

    uint8_t on_index;
    uint8_t on_around_index;

    uint32_t strip;
  } mzapo_ledstrip_t;

  mzapo_ledstrip_t ledstrip_create(volatile uint32_t *mem_base);

  void ledstrip_clear(mzapo_ledstrip_t *ledstrip);
  void ledstrip_turn_on(mzapo_ledstrip_t *ledstrip, uint8_t index, uint8_t around);
  void ledstrip_progress_bar_step(mzapo_ledstrip_t *ledstrip, int8_t steps);

#ifdef __cplusplus
} /* extern "C"*/
#endif

#endif // __MZAPO_LED_STRIP_H__
Do not follow this link