mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-09-25 13:22:06 +00:00
Add single byte send debug function
This commit is contained in:
@@ -350,6 +350,15 @@ Bus::Handle Bus::get() { return Handle{*this}; };
|
|||||||
void Bus::set_dominant() { phy_set_dominant(); }
|
void Bus::set_dominant() { phy_set_dominant(); }
|
||||||
void Bus::set_recessive() { phy_set_recessive(); }
|
void Bus::set_recessive() { phy_set_recessive(); }
|
||||||
|
|
||||||
|
Send Bus::sendbyte(uint8_t byte, bool ack) {
|
||||||
|
auto handle = get();
|
||||||
|
uint8_t data_i = 0;
|
||||||
|
if (const Send serr = handle.send_data(&byte, 1, ack, &data_i);
|
||||||
|
serr != Send{0})
|
||||||
|
return serr;
|
||||||
|
return phy_send_done(&data_i);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MEASURE_BUS
|
#ifdef MEASURE_BUS
|
||||||
// Debug bit-timing measurement on the one physical bus; instance-scoped for
|
// Debug bit-timing measurement on the one physical bus; instance-scoped for
|
||||||
// the same reason as is_active().
|
// the same reason as is_active().
|
||||||
|
|||||||
Reference in New Issue
Block a user