99typedef enum : uint8_t {
112typedef enum : uint8_t {
131typedef enum : uint8_t {
144typedef enum : uint8_t {
592 uint8_t* out_checksum);
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Full-featured Serial Communications Interface driver.
uint8_t ra8_sci_lin_pid(uint8_t id)
Compute the LIN protected identifier (PID) from a frame id.
ra8_sci_lin_limits_t
Public range limits for the LIN frame identifier.
@ k_ra8_sci_lin_id_max
Highest legal 6-bit LIN frame id.
ra8_err_t ra8_sci_lin_read_response(uint8_t channel, uint8_t *out_data, uint8_t len, uint8_t *out_checksum)
Read a LIN response: len data bytes plus one checksum byte.
ra8_err_t ra8_sci_lin_clear_status(uint8_t channel)
Clear the Simple-LIN status latches (XSR0) via XFCLR.
ra8_err_t ra8_sci_lin_wait_break(uint8_t channel)
Block until the responder detects a break field (XSR0.BFDF set).
ra8_sci_lin_role_t
Selects whether the channel drives (commander) or detects (responder) the LIN frame header.
@ k_ra8_sci_lin_role_responder
Detect the header (subordinate node).
@ k_ra8_sci_lin_role_commander
Generate the header (bus controller).
ra8_err_t ra8_sci_lin_init(uint8_t channel, const ra8_sci_lin_cfg_t *cfg)
Configure an SCI_B channel for a LIN role (commander or responder).
ra8_sci_lin_checksum_mode_t
Selector for the classic vs.
@ k_ra8_sci_lin_checksum_classic
LIN 1.x: sum of data bytes only.
@ k_ra8_sci_lin_checksum_enhanced
LIN 2.x: sum of PID + data bytes.
ra8_sci_lin_timer_clk_t
Break-field timer clock divider (maps to SCI_B XCR0.TCSS[1:0]).
@ k_ra8_sci_lin_clk_div4
Break timer clock = TCLK / 4.
@ k_ra8_sci_lin_clk_div16
Break timer clock = TCLK / 16.
@ k_ra8_sci_lin_clk_div64
Break timer clock = TCLK / 64.
ra8_err_t ra8_sci_lin_checksum(ra8_sci_lin_checksum_mode_t mode, uint8_t pid, const uint8_t *data, uint8_t len, uint8_t *out_checksum)
Compute a classic or enhanced LIN checksum over a data field.
ra8_err_t ra8_sci_lin_check_response(ra8_sci_lin_checksum_mode_t mode, uint8_t pid, const uint8_t *data, uint8_t len, uint8_t received, bool *out_valid)
Verify a received LIN response checksum against the data field.
ra8_err_t ra8_sci_lin_check_header(uint8_t sync, uint8_t pid, uint8_t *out_id, bool *out_valid)
Validate a received LIN header: SYNC byte + protected identifier.
ra8_err_t ra8_sci_lin_send_header(uint8_t channel, uint8_t id)
Transmit a full LIN header: break + SYNC (0x55) + PID.
ra8_err_t ra8_sci_lin_break_detected(uint8_t channel, bool *out_detected)
Report whether the responder's break-field detector has fired.
ra8_err_t ra8_sci_lin_send_response(uint8_t channel, ra8_sci_lin_checksum_mode_t mode, uint8_t pid, const uint8_t *data, uint8_t len)
Publish a LIN response: data bytes followed by the checksum.
ra8_err_t ra8_sci_lin_send_break(uint8_t channel)
Emit a LIN break field on the channel's TXD line.
Configuration descriptor for ra8_sci_init.
Configuration descriptor for ra8_sci_lin_init.
ra8_sci_cfg_t uart
Base async-UART baud + framing.
ra8_sci_lin_role_t role
Commander (generate) or responder (detect) the frame header.
ra8_sci_lin_timer_clk_t timer_clk
Break-field timer clock (TCSS).
uint16_t break_field_len
XCR2.BFLW: dominant time = (break_field_len + 1) x timer clock.