ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
c6_join.h
Go to the documentation of this file.
1
33
34#pragma once
35
36#include <stddef.h>
37#include <stdint.h>
38
39#include "ra8_c6link.h"
40#include "ra8_err.h"
41
73
98
126
146
162typedef struct c6_join_lease {
163 uint32_t ip;
164 uint32_t mask;
165 uint32_t gateway;
166 uint32_t dhcp_server;
167 bool ping_ok;
169
208
224void c6_join_puts(const char* text);
225
240void c6_join_put_u32(uint32_t value);
241
258void c6_join_put_hex(uint32_t value, uint8_t digits);
259
274void c6_join_put_ip(uint32_t ip);
275
290void c6_join_put_mac(const ra8_c6link_mac_t* mac);
291
307void c6_join_print_banner(uint32_t cpuclk_hz, uint32_t pclka_hz);
c6_join_ip_shift_t
Byte shifts that split a packed IPv4 address into its four octets.
Definition c6_join.h:140
@ k_c6_join_ip_shift_1
Shift for the second octet.
Definition c6_join.h:142
@ k_c6_join_ip_shift_2
Shift for the third octet.
Definition c6_join.h:143
@ k_c6_join_ip_shift_0
Shift for the first (highest) octet.
Definition c6_join.h:141
@ k_c6_join_ip_shift_3
Shift for the fourth (lowest) octet.
Definition c6_join.h:144
c6_join_net_t
Timing and retry bounds for association, DHCP and the ping.
Definition c6_join.h:90
@ k_c6_join_dhcp_wait_ms
DHCP lease wait budget, milliseconds/ticks.
Definition c6_join.h:93
@ k_c6_join_assoc_gap_ms
Gap between association polls, milliseconds.
Definition c6_join.h:92
@ k_c6_join_ping_gap_ms
Gap between echoes, milliseconds.
Definition c6_join.h:96
@ k_c6_join_assoc_tries
Association poll attempts before giving up.
Definition c6_join.h:91
@ k_c6_join_ping_tries
ICMP echoes sent to the gateway.
Definition c6_join.h:94
@ k_c6_join_ping_wait_ms
Per-echo reply timeout, milliseconds/ticks.
Definition c6_join.h:95
void c6_join_print_banner(uint32_t cpuclk_hz, uint32_t pclka_hz)
Print the banner: identity, clocks and link parameters.
c6_join_cfg_t
Link, thread and pacing parameters this application chooses.
Definition c6_join.h:60
@ k_c6_join_worker_stack
Worker-thread stack, in bytes.
Definition c6_join.h:68
@ k_c6_join_uart_baud
Console rate, 8N1, over the J-Link OB VCOM.
Definition c6_join.h:61
@ k_c6_join_heartbeat_ms
Heartbeat gap after the verdict, in milliseconds and therefore in ThreadX ticks.
Definition c6_join.h:66
@ k_c6_join_worker_prio
Worker priority and preemption threshold.
Definition c6_join.h:70
@ k_c6_join_edge_poll_ms
Poll period for a side-band pin with no ICU channel.
Definition c6_join.h:63
@ k_c6_join_boot_wait_ms
Settling delay before the first transaction.
Definition c6_join.h:65
@ k_c6_join_arena_bytes
Decode arena handed to the facade.
Definition c6_join.h:71
@ k_c6_join_sck_hz
SPI bit rate; the rate silicon ran at.
Definition c6_join.h:62
ra8_err_t c6_join_net_up(ra8_c6link_t *link, const ra8_c6link_mac_t *mac, c6_join_lease_t *out)
Bring the IP layer up over the associated C6 link and prove traffic.
struct c6_join_lease c6_join_lease_t
void c6_join_put_hex(uint32_t value, uint8_t digits)
Emit a value as a fixed-width lower-case hexadecimal field.
void c6_join_put_ip(uint32_t ip)
Emit a packed IPv4 address as a dotted quad.
void c6_join_put_u32(uint32_t value)
Emit an unsigned 32-bit value in decimal.
void c6_join_put_mac(const ra8_c6link_mac_t *mac)
Emit an IEEE 802 address as six colon-separated hexadecimal octets.
void c6_join_puts(const char *text)
Write a NUL-terminated string to the board console.
c6_join_fmt_t
Bounds for the console formatters in src/c6_join_console.c.
Definition c6_join.h:114
@ k_c6_join_str_max
Longest string the console helper emits.
Definition c6_join.h:115
@ k_c6_join_hex_byte
Hex digits printed for a byte-wide field.
Definition c6_join.h:122
@ k_c6_join_hex_bits
Bits per hexadecimal digit.
Definition c6_join.h:119
@ k_c6_join_dec_digits
Digits in the widest 32-bit decimal value.
Definition c6_join.h:117
@ k_c6_join_ip_mask
Single-octet mask for IPv4 formatting.
Definition c6_join.h:124
@ k_c6_join_hex_mask
Nibble mask.
Definition c6_join.h:120
@ k_c6_join_dec_radix
Decimal radix.
Definition c6_join.h:116
@ k_c6_join_ip_octets
Octets in an IPv4 address.
Definition c6_join.h:123
@ k_c6_join_hex_digits
Digits in the widest 32-bit hex value.
Definition c6_join.h:118
@ k_c6_join_hex_alpha
First nibble value spelled with a letter.
Definition c6_join.h:121
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
What the DHCP bring-up learned, for the verdict and the console.
Definition c6_join.h:162
uint32_t gateway
Default gateway from the lease; the ping target.
Definition c6_join.h:165
uint32_t mask
Subnet mask from the lease.
Definition c6_join.h:164
uint32_t dhcp_server
Address of the DHCP server that answered.
Definition c6_join.h:166
bool ping_ok
A gateway ICMP echo reply was received.
Definition c6_join.h:167
uint32_t ip
Leased station address, or zero on failure.
Definition c6_join.h:163