mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-06 17:03:17 +00:00
Expose Bus mute via Peripheral
This commit is contained in:
@@ -25,6 +25,8 @@ public:
|
||||
|
||||
uint16_t address() const { return address_; };
|
||||
uint16_t controller() const { return controller_; };
|
||||
void mute(bool mute) { bus.mute(mute); };
|
||||
bool is_muted() const { return bus.is_muted(); };
|
||||
|
||||
Error::Read read(Frame *in, Frame::Print print) {
|
||||
return bus.read(address_, in, print);
|
||||
@@ -87,8 +89,10 @@ public:
|
||||
out->data[3] = to_underlying(Lancheck_End_Resp);
|
||||
out->reaction = 1;
|
||||
break;
|
||||
case PACK3(COMMUNICATION_V1, COMM_CTRL, to_underlying(Advertise_Function)):
|
||||
case PACK3(COMMUNICATION_V2, COMM_CTRL, to_underlying(Advertise_Function)):
|
||||
case PACK3(COMMUNICATION_V1, COMM_CTRL,
|
||||
to_underlying(Advertise_Function)):
|
||||
case PACK3(COMMUNICATION_V2, COMM_CTRL,
|
||||
to_underlying(Advertise_Function)):
|
||||
((Devs::id == static_cast<Device>(b3)
|
||||
? std::get<Devs>(devices_).enable(out),
|
||||
0 : 0),
|
||||
@@ -108,8 +112,10 @@ public:
|
||||
out->reaction = 1;
|
||||
break;
|
||||
}
|
||||
case PACK3(COMMUNICATION_V1, COMM_CTRL, to_underlying(List_Functions_Req)):
|
||||
case PACK3(COMMUNICATION_V2, COMM_CTRL, to_underlying(List_Functions_Req)): {
|
||||
case PACK3(COMMUNICATION_V1, COMM_CTRL,
|
||||
to_underlying(List_Functions_Req)):
|
||||
case PACK3(COMMUNICATION_V2, COMM_CTRL,
|
||||
to_underlying(List_Functions_Req)): {
|
||||
controller_ = in->controller_addr;
|
||||
out->peripheral_addr = controller_;
|
||||
out->is_unicast = true;
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ int main() {
|
||||
case 'k': toggle_flag(&echoCharacters, "Echo characters: "); break;
|
||||
case 'm':
|
||||
toggle_flag(&muteBus, "Mute device: ");
|
||||
AVCLAN_muteDevice(muteBus);
|
||||
peripheral.mute(muteBus);
|
||||
break;
|
||||
|
||||
// X/x isn't a toggle interface because this is used
|
||||
|
||||
Reference in New Issue
Block a user