NEORV32 - Software Framework Documentation
Loading...
Searching...
No Matches
neorv32_neoled.h
Go to the documentation of this file.
1// ================================================================================ //
2// The NEORV32 RISC-V Processor - https://github.com/stnolting/neorv32 //
3// Copyright (c) NEORV32 contributors. //
4// Copyright (c) 2020 - 2024 Stephan Nolting. All rights reserved. //
5// Licensed under the BSD-3-Clause license, see LICENSE for details. //
6// SPDX-License-Identifier: BSD-3-Clause //
7// ================================================================================ //
8
18#ifndef neorv32_neoled_h
19#define neorv32_neoled_h
20
21/**********************************************************************/
26typedef volatile struct __attribute__((packed,aligned(4))) {
27 uint32_t CTRL;
28 uint32_t DATA;
30
32#define NEORV32_NEOLED ((neorv32_neoled_t*) (NEORV32_NEOLED_BASE))
33
75/**********************************************************************/
80void neorv32_neoled_setup(uint32_t prsc, uint32_t t_total, uint32_t t_high_zero, uint32_t t_high_one, int irq_mode);
81void neorv32_neoled_setup_ws2812(int irq_mode);
82void neorv32_neoled_set_mode(uint32_t mode);
85void neorv32_neoled_enable(void);
86void neorv32_neoled_disable(void);
87void neorv32_neoled_write_blocking(uint32_t data);
92/**********************************************************************/
99inline void __attribute__ ((always_inline)) neorv32_neoled_write_nonblocking(uint32_t data) {
100
101 NEORV32_NEOLED->DATA = data; // send new LED data
102}
103
104#endif // neorv32_neoled_h
#define NEORV32_NEOLED
Definition neorv32_neoled.h:32
void neorv32_neoled_write_blocking(uint32_t data)
Definition neorv32_neoled.c:194
void neorv32_neoled_set_mode(uint32_t mode)
Definition neorv32_neoled.c:131
int neorv32_neoled_available(void)
Definition neorv32_neoled.c:27
void neorv32_neoled_strobe_blocking(void)
Definition neorv32_neoled.c:143
void neorv32_neoled_enable(void)
Definition neorv32_neoled.c:172
uint32_t neorv32_neoled_get_buffer_size(void)
Definition neorv32_neoled.c:211
void neorv32_neoled_disable(void)
Definition neorv32_neoled.c:181
NEORV32_NEOLED_CTRL_enum
Definition neorv32_neoled.h:35
@ NEOLED_CTRL_T_ONE_H_4
Definition neorv32_neoled.h:64
@ NEOLED_CTRL_T_ZERO_H_4
Definition neorv32_neoled.h:58
@ NEOLED_CTRL_PRSC1
Definition neorv32_neoled.h:40
@ NEOLED_CTRL_PRSC0
Definition neorv32_neoled.h:39
@ NEOLED_CTRL_TX_HALF
Definition neorv32_neoled.h:68
@ NEOLED_CTRL_T_ZERO_H_1
Definition neorv32_neoled.h:55
@ NEOLED_CTRL_TX_EMPTY
Definition neorv32_neoled.h:67
@ NEOLED_CTRL_T_ONE_H_3
Definition neorv32_neoled.h:63
@ NEOLED_CTRL_IRQ_CONF
Definition neorv32_neoled.h:66
@ NEOLED_CTRL_BUFS_0
Definition neorv32_neoled.h:43
@ NEOLED_CTRL_PRSC2
Definition neorv32_neoled.h:41
@ NEOLED_CTRL_T_TOT_4
Definition neorv32_neoled.h:52
@ NEOLED_CTRL_T_TOT_2
Definition neorv32_neoled.h:50
@ NEOLED_CTRL_STROBE
Definition neorv32_neoled.h:38
@ NEOLED_CTRL_T_TOT_0
Definition neorv32_neoled.h:48
@ NEOLED_CTRL_T_ONE_H_2
Definition neorv32_neoled.h:62
@ NEOLED_CTRL_TX_BUSY
Definition neorv32_neoled.h:70
@ NEOLED_CTRL_T_ZERO_H_0
Definition neorv32_neoled.h:54
@ NEOLED_CTRL_T_ONE_H_0
Definition neorv32_neoled.h:60
@ NEOLED_CTRL_T_ZERO_H_2
Definition neorv32_neoled.h:56
@ NEOLED_CTRL_T_ZERO_H_3
Definition neorv32_neoled.h:57
@ NEOLED_CTRL_MODE
Definition neorv32_neoled.h:37
@ NEOLED_CTRL_BUFS_3
Definition neorv32_neoled.h:46
@ NEOLED_CTRL_T_TOT_3
Definition neorv32_neoled.h:51
@ NEOLED_CTRL_TX_FULL
Definition neorv32_neoled.h:69
@ NEOLED_CTRL_T_TOT_1
Definition neorv32_neoled.h:49
@ NEOLED_CTRL_BUFS_2
Definition neorv32_neoled.h:45
@ NEOLED_CTRL_T_ONE_H_1
Definition neorv32_neoled.h:61
@ NEOLED_CTRL_BUFS_1
Definition neorv32_neoled.h:44
@ NEOLED_CTRL_EN
Definition neorv32_neoled.h:36
void neorv32_neoled_strobe_nonblocking(void)
Definition neorv32_neoled.c:158
void neorv32_neoled_setup(uint32_t prsc, uint32_t t_total, uint32_t t_high_zero, uint32_t t_high_one, int irq_mode)
Definition neorv32_neoled.c:48
void neorv32_neoled_write_nonblocking(uint32_t data)
Definition neorv32_neoled.h:99
void neorv32_neoled_setup_ws2812(int irq_mode)
Definition neorv32_neoled.c:72
Definition neorv32_neoled.h:26
uint32_t DATA
Definition neorv32_neoled.h:28
uint32_t CTRL
Definition neorv32_neoled.h:27