50typedef enum : uint8_t {
67typedef enum : uint8_t {
82typedef enum : uint8_t {
196typedef enum : uint8_t {
void ra8_dmac_dispatch_half(uint8_t channel)
Fire the per-channel half-complete callback (DMINT.RPTIE path).
void(* ra8_dmac_callback_fn_t)(void *ctx)
Per-channel DMAC completion / half-complete callback signature.
ra8_dmac_mode_t
Transfer mode select.
@ k_ra8_dmac_mode_repeat
DMTMD.MD = 01b.
@ k_ra8_dmac_mode_repeat_block
DMTMD.MD = 11b.
@ k_ra8_dmac_mode_normal
DMTMD.MD = 00b.
@ k_ra8_dmac_mode_block
DMTMD.MD = 10b.
ra8_dmac_repeat_area_t
Selects which side is the repeat / block area (DMTMD.DTS).
@ k_ra8_dmac_repeat_area_dest
DTS = 00b.
@ k_ra8_dmac_repeat_area_none
DTS = 10b.
@ k_ra8_dmac_repeat_area_src
DTS = 01b.
void ra8_dmac_dispatch(uint8_t channel)
Fire the per-channel completion callback (DMINT.DTIE path).
ra8_err_t ra8_dmac_start_repeat(uint8_t channel, const ra8_dmac_config_t *cfg)
Programme a DMAC channel in repeat-area transfer mode.
ra8_dmac_width_t
Transfer element width.
@ k_ra8_dmac_width_word
32-bit transfers (DMTMD.SZ = 10b).
@ k_ra8_dmac_width_byte
8-bit transfers (DMTMD.SZ = 00b).
@ k_ra8_dmac_width_half
16-bit transfers (DMTMD.SZ = 01b).
ra8_err_t ra8_dmac_attach_half_complete_handler(uint8_t channel, ra8_dmac_callback_fn_t fn, void *ctx)
Attach a half-block IRQ callback to a DMAC channel.
ra8_err_t ra8_dmac_stop(uint8_t channel)
Disable a DMAC0 channel and drop its MSTP reference.
ra8_err_t ra8_dmac_is_active(uint8_t channel, bool *out_active)
Query whether a DMAC0 channel is mid-transfer.
ra8_err_t ra8_dmac_start(uint8_t channel, const ra8_dmac_config_t *cfg)
Programme and enable a DMAC0 channel.
ra8_err_t ra8_dmac_set_address_mode(uint8_t channel, ra8_dmac_addr_mode_t src_mode, ra8_dmac_addr_mode_t dest_mode)
Override the DMAMD.SM / DMAMD.DM address-update modes.
ra8_err_t ra8_dmac_start_block(uint8_t channel, const ra8_dmac_config_t *cfg)
Programme a DMAC channel in block-transfer mode.
ra8_err_t ra8_dmac_wait_idle(uint8_t channel, uint32_t poll_limit)
Spin until a DMAC0 channel goes idle or a poll bound expires.
ra8_dmac_addr_mode_t
Per-side address-update mode (DMAMD.SM / DMAMD.DM).
@ k_ra8_dmac_addr_decrement
11b: decrement.
@ k_ra8_dmac_addr_fixed
00b: address fixed.
@ k_ra8_dmac_addr_offset
01b: offset addition.
@ k_ra8_dmac_addr_increment
10b: increment.
ra8_err_t ra8_dmac_attach_callback(uint8_t channel, ra8_dmac_callback_fn_t fn, void *ctx)
Attach a transfer-end IRQ callback to a DMAC channel.
ra8_err_t ra8_dmac_software_trigger(uint8_t channel)
Software-trigger one transfer request on a DMAC0 channel.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
DMAC channel configuration.
ra8_dmac_mode_t mode
Transfer mode (DMTMD.MD).
ra8_dmac_repeat_area_t repeat_area
DMTMD.DTS area select.
uint16_t count
Transfer count (DMCRA low).
bool irq_each
Enable RPTIE/ESIE per repeat.
uint32_t src
Source address (DMSAR).
bool enable_dtie
Enable DMINT.DTIE on full end.
bool dst_inc
true: DM = increment, else fixed.
bool src_inc
true: SM = increment, else fixed.
uint16_t block_count
DMCRB block/repeat count.
uint32_t dst
Destination address (DMDAR).
ra8_dmac_width_t width
Transfer element width.