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

Go to the source code of this file.

Macros

#define BAUDRATE_MONITOR_PIN   V24_RXC
 GPIO pin used by default for baudrate estimation.
 

Functions

void baudrate_estimator_init (V24_PIN_T pin)
 Initialize baudrate estimator on a specific RX clock pin.
 
float baudrate_estimator_get_current_estimation (V24_PIN_T pin)
 Get latest baudrate estimate.
 

Macro Definition Documentation

◆ BAUDRATE_MONITOR_PIN

#define BAUDRATE_MONITOR_PIN   V24_RXC

GPIO pin used by default for baudrate estimation.

Definition at line 27 of file baudrate_monitor.h.

Function Documentation

◆ baudrate_estimator_get_current_estimation()

float baudrate_estimator_get_current_estimation ( V24_PIN_T  pin)

Get latest baudrate estimate.

Parameters
pinV.24 clock pin being monitored.
Returns
Estimated baudrate in Hz.

Definition at line 65 of file baudrate_monitor.c.

References baud_hz, and baud_ready.

Referenced by print_status_event().

Here is the caller graph for this function:

◆ baudrate_estimator_init()

void baudrate_estimator_init ( V24_PIN_T  pin)

Initialize baudrate estimator on a specific RX clock pin.

Parameters
pinV.24 clock pin to monitor.

Definition at line 118 of file baudrate_monitor.c.

References baud_timer, baud_timer_cb(), BAUD_TIMER_MS, current_pin_count, monitored_pin, PIN_COUNT, and rxc_edge_isr().

Referenced by main().

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