ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_nsc_io.h
Go to the documentation of this file.
1
28
29#pragma once
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#include <stdint.h>
36
37#include "ra8_acmphs.h"
38#include "ra8_adc.h"
39#include "ra8_crc.h"
40#include "ra8_dac_b.h"
41#include "ra8_err.h"
42#include "ra8_eth.h"
43#include "ra8_glcdc.h"
44#include "ra8_gpt.h"
45#include "ra8_nsc_veneer.h"
46#include "ra8_pdm.h"
47
48/* =============================================================================
49 * GPT
50 * =============================================================================
51 */
52
57[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_gpt_init(uint8_t channel, const ra8_gpt_cfg_t* cfg);
58
63[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_gpt_read(uint8_t channel, uint32_t* out);
64
65/* =============================================================================
66 * ADC
67 * =============================================================================
68 */
69
74[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_adc_init(void);
75
80[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_adc_read_channel(uint8_t channel, uint16_t* out_raw);
81
82/* =============================================================================
83 * DAC_B
84 * =============================================================================
85 */
86
92
97[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_dac_b_write(uint8_t channel, uint16_t value);
98
99/* =============================================================================
100 * ACMPHS
101 * =============================================================================
102 */
103
109
114[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_acmphs_read_output(uint8_t channel,
115 ra8_level_t* out);
116
117/* =============================================================================
118 * CRC
119 * =============================================================================
120 */
121
127
132[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_crc_compute(const uint8_t* data,
133 uint32_t len,
134 uint32_t* out_crc);
135
136/* =============================================================================
137 * GLCDC
138 * =============================================================================
139 */
140
146
147/* =============================================================================
148 * PDM
149 * =============================================================================
150 */
151
156[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_pdm_init(void);
157
158/* =============================================================================
159 * Ethernet (lifecycle only -- frame I/O lives in ra8_nsc_eth.c)
160 * =============================================================================
161 */
162
167[[nodiscard]] RA8_NSC_VENEER ra8_err_t ra8_nsc_eth_init(void);
168
169#ifdef __cplusplus
170}
171#endif
Full-featured High-Speed Analog Comparator (ACMPHS) driver.
Full-featured ADC_B driver.
#define RA8_NSC_VENEER
Mark a TrustZone Secure-to-Non-Secure entry-point veneer.
CRC hardware calculator driver header.
ra8_crc_poly_t
Polynomial selection values written to CRCCR0.GPS[2:0].
Full-featured 12-bit DAC_B driver.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Ethernet Switch Module (ESWM) + frame TX/RX driver.
Graphics LCD Controller driver (two-layer with alpha blending).
Full-featured General PWM Timer (GPT) driver.
ra8_err_t ra8_nsc_dac_b_write(uint8_t channel, uint16_t value)
NSC veneer: write a 12-bit value to a DAC channel.
Definition ra8_nsc_io.c:205
ra8_err_t ra8_nsc_acmphs_init(void)
NSC veneer: bring up the high-speed analog comparator block.
Definition ra8_nsc_io.c:230
ra8_err_t ra8_nsc_acmphs_read_output(uint8_t channel, ra8_level_t *out)
NSC veneer: read a comparator output level.
Definition ra8_nsc_io.c:260
ra8_err_t ra8_nsc_glcdc_init(const ra8_glcdc_config_t *cfg)
NSC veneer: bring up the graphics LCD controller.
Definition ra8_nsc_io.c:355
ra8_err_t ra8_nsc_pdm_init(void)
NSC veneer: bring up the PDM microphone interface.
Definition ra8_nsc_io.c:382
ra8_err_t ra8_nsc_crc_compute(const uint8_t *data, uint32_t len, uint32_t *out_crc)
NSC veneer: compute CRC over a buffer.
Definition ra8_nsc_io.c:322
ra8_err_t ra8_nsc_gpt_read(uint8_t channel, uint32_t *out)
NSC veneer: read the current GPT counter value.
Definition ra8_nsc_io.c:90
ra8_err_t ra8_nsc_gpt_init(uint8_t channel, const ra8_gpt_cfg_t *cfg)
NSC veneer: bring up a GPT channel.
Definition ra8_nsc_io.c:58
ra8_err_t ra8_nsc_dac_b_init(void)
NSC veneer: bring up the DAC.
Definition ra8_nsc_io.c:177
ra8_err_t ra8_nsc_eth_init(void)
NSC veneer: bring up the ethernet switch module.
Definition ra8_nsc_io.c:407
ra8_err_t ra8_nsc_adc_init(void)
NSC veneer: bring up the ADC.
Definition ra8_nsc_io.c:119
ra8_err_t ra8_nsc_adc_read_channel(uint8_t channel, uint16_t *out_raw)
NSC veneer: read one ADC channel sample.
Definition ra8_nsc_io.c:150
ra8_err_t ra8_nsc_crc_init(ra8_crc_poly_t poly)
NSC veneer: bring up the CRC unit with a polynomial.
Definition ra8_nsc_io.c:289
Macros for declaring Non-Secure Callable veneer functions.
Pulse Density Modulation Interface (PDM-IF) capture driver.
ra8_level_t
Digital output / input level.
Minimal GLCDC configuration for a single-layer panel.
Definition ra8_glcdc.h:55
Configuration descriptor for ra8_gpt_init.
Definition ra8_gpt.h:83