ether2ser 0.1.0
Ethernet <-> synchronous V.24 bridge firmware for RP2040 + W5500
Loading...
Searching...
No Matches
event_loop.h File Reference
Include dependency graph for event_loop.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void event_loop (app_ctx_t *app)
 Run the main application polling loop.
 

Function Documentation

◆ event_loop()

void event_loop ( app_ctx_t app)

Run the main application polling loop.

Parameters
appApplication context.

TODO: Its not good that the event loop pokes around in hdlc state. We should add a helper like hdlc_sync_acc_reset_frame that hides these details and just call that from here. This shall be refactored in the next iteration.

Definition at line 383 of file event_loop.c.

References cli_poll(), drain_hdlc_frames_to_udp(), drain_rx_until_empty(), log_take_emitted_flag(), MAIN_LOOP_SLEEP_US, app_ctx_t::need_prompt, poll_and_dispatch_events(), poll_and_enqueue_udp_rx(), poll_hdlc_idle_timeout(), poll_hdlc_no_progress(), poll_tx_pipeline(), print_prompt(), event_loop_runtime_t::rx_byte, rx_clock_poll_stall(), payload_statistics_t::rx_fifo_stall_events, app_ctx_t::stats, payload_statistics_t::udp_rx_buffer_full_counts, payload_statistics_t::udp_rx_throttle_skips, event_loop_runtime_t::udp_rx_throttled, payload_statistics_t::udp_tx_buffer_full_counts, update_rx_drain_stats(), update_statistics(), update_udp_rx_throttle_state(), w5500_poll_udp_buffer_full_events(), and event_loop_runtime_t::work_done.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function: