9 #include <satcat5/cfgbus_interrupt.h>
12 #include <satcat5/ptp_interface.h>
15 #define SATCAT5_MAILMAP_BYTES 1600
43 void write_bytes(
unsigned nbytes,
const void* src)
override;
47 bool read_bytes(
unsigned nbytes,
void* dst)
override;
62 {
return m_clock_reg; }
74 u8 rx_buff[SATCAT5_MAILMAP_BYTES];
76 volatile u32 rx_ptp_time[4];
79 u8 tx_buff[SATCAT5_MAILMAP_BYTES];
81 volatile u32 rt_clk_ctrl[6];
82 volatile u32 tx_ptp_time[4];
83 volatile u32 ptp_status;
107 void write_bytes(
unsigned nbytes,
const void* src)
override;
108 bool read_bytes(
unsigned nbytes,
void* dst)
override;
Memory-mapped local ConfigBus.
Event-handler for individual ConfigBus interrupts.
Pointer-like wrapper for one or more ConfigBus registers.
Abstract API for reading byte-streams and packets.
Abstract API for writing byte-streams and packets.
Alternate MailMap driver using word-aligned access only.
u8 read_next() override
Read the next byte from the underlying buffer or device.
void write_next(u8 data) override
Write the next byte to the underlying buffer or device.
void write_bytes(unsigned nbytes, const void *src) override
Write 0 or more bytes from a buffer.
MailmapAligned(satcat5::cfg::ConfigBusMmap *cfg, unsigned devaddr)
Constructor links this driver to a ConfigBus address.
bool read_bytes(unsigned nbytes, void *dst) override
Read 0 or more bytes into a buffer.
Driver for the internal "MailMap" Ethernet port.
void write_overflow() override
Optional error handling for write overflow.
void read_underflow() override
Optional error handling for read underflow.
satcat5::io::Readable * ptp_rx_read() override
Return an object suitable for reading the next PTP frame.
void write_next(u8 data) override
Write the next byte to the underlying buffer or device.
unsigned get_read_ready() const override
How many bytes can be read without blocking?
satcat5::ptp::Time ptp_tx_start() override
Begin sending a timestamped message.
u8 read_next() override
Read the next byte from the underlying buffer or device.
satcat5::ptp::Time ptp_tx_timestamp() override
Return timestamp of the most recent outgoing message.
void irq_event() override
Interrupt service routine.
satcat5::cfg::Register ptp_clock_reg() const
Control register for creating a cfg::PtpRealtime object.
void write_abort() override
If possible, abort the current partially-written packet.
bool write_finalize() override
Mark end of frame and release temporary working data.
void read_finalize() override
Consume any remaining bytes in this frame, if applicable.
satcat5::io::Writeable * ptp_tx_write() override
Return an object suitable for writing the next PTP frame.
unsigned get_write_space() const override
How many bytes can be written without blocking?
void write_bytes(unsigned nbytes, const void *src) override
Write 0 or more bytes from a buffer.
Mailmap(satcat5::cfg::ConfigBusMmap *cfg, unsigned devaddr)
Constructor links this driver to a ConfigBus address.
bool read_bytes(unsigned nbytes, void *dst) override
Read 0 or more bytes into a buffer.
satcat5::ptp::Time ptp_rx_timestamp() override
Return timestamp of the current incoming message.
satcat5::ptp::Time ptp_time_now() override
Return the best available estimate of the current time.
Generic API for network ports that support PTP.
High-precision timestamp for use with PTP / IEEE1588.
"Readable" I/O interface core definitions
"Writeable" I/O interface core definitions