ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_esp_hosted_gpio_internal.h
Go to the documentation of this file.
1
29
30#pragma once
31
32#include <stdint.h>
33
34#include "esp_hosted_os_abstraction.h"
35#include "ra8_attributes.h"
36#include "ra8_err.h"
37#include "ra8_pin_interface.h"
38#include "ra8_port_constants.h"
39
72
108RA8_PRIV [[nodiscard]] ra8_err_t priv_ra8_esp_hosted_gpio_bind(hosted_osi_funcs_t* out);
109
159RA8_PRIV [[nodiscard]] bool priv_ra8_esp_hosted_gpio_decode_pin(const void* gpio_port,
160 uint32_t gpio_num,
161 ra8_port_pin_t* out_pin);
162
196
224
259RA8_PRIV [[nodiscard]] ra8_err_t priv_ra8_esp_hosted_gpio_set_edge_poll_ms(uint16_t period_ms);
260
306 uint8_t sense,
307 void (*handler)(void*),
308 void* arg);
309
342
369RA8_PRIV [[nodiscard]] uint8_t priv_ra8_esp_hosted_gpio_edge_count(void);
370
406
449RA8_PRIV [[nodiscard]] bool
450priv_ra8_esp_hosted_gpio_edge_seen(uint8_t prev_level, uint8_t now_level, uint8_t sense);
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
ra8_board_eth_pin_t pin
Pin.
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
void priv_ra8_esp_hosted_gpio_set_pin_interface(const ra8_pin_interface_t *iface)
Replace the pin driver the slice reads and writes levels through.
ra8_err_t priv_ra8_esp_hosted_gpio_edge_register(ra8_port_pin_t pin, uint8_t sense, void(*handler)(void *), void *arg)
Take a pin under software edge detection.
void priv_ra8_esp_hosted_gpio_edge_poll_once(void)
Sample every polled row once and dispatch the edges seen.
ra8_err_t priv_ra8_esp_hosted_gpio_edge_unregister(ra8_port_pin_t pin)
Drop a pin from software edge detection.
bool priv_ra8_esp_hosted_gpio_decode_pin(const void *gpio_port, uint32_t gpio_num, ra8_port_pin_t *out_pin)
Decode the vendored (void* port, uint32_t pin) pair into a pin.
ra8_err_t priv_ra8_esp_hosted_gpio_bind(hosted_osi_funcs_t *out)
Populate the eight GPIO slots of the OS-abstraction vtable.
ra8_esp_hosted_gpio_limits_t
Fixed bounds of the side-band GPIO slice.
@ k_ra8_esp_hosted_gpio_poll_ms_default
Sampling period used until priv_ra8_esp_hosted_gpio_set_edge_poll_ms runs.
@ k_ra8_esp_hosted_gpio_row_max
Rows in the polled edge table; also the registration ceiling.
@ k_ra8_esp_hosted_gpio_irq_priority
NVIC priority given to a hardware side-band edge.
const ra8_pin_interface_t * priv_ra8_esp_hosted_gpio_pin_interface(void)
Report the pin driver currently installed in the slice.
ra8_err_t priv_ra8_esp_hosted_gpio_set_edge_poll_ms(uint16_t period_ms)
Set the sampling period the software edge detector runs at.
uint8_t priv_ra8_esp_hosted_gpio_edge_count(void)
Report how many pins are under software edge detection.
bool priv_ra8_esp_hosted_gpio_edge_seen(uint8_t prev_level, uint8_t now_level, uint8_t sense)
Decide whether two consecutive samples show the configured edge.
Abstract pin-driver interface for dependency injection.
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
ra8_port_pin_t
Packed (port << 8) | pin pin identifier.
Vtable for a pin driver.