3#include "../../proto/transcoder.h"
4#include "../communication.h"
10 PowerCommand* output) {
31 Esp32Command cmd = Esp32Command_init_default;
35 memcpy(output, &cmd.command.wifi_command,
sizeof(PowerCommand));
42 PowerCommand power_cmd = PowerCommand_init_zero;
43 power_cmd.type = PowerCommand_Type_SLEEP;
45 PowerCommand resp = PowerCommand_init_zero;
55 PowerCommand power_cmd = PowerCommand_init_zero;
56 power_cmd.type = PowerCommand_Type_WAKEUP;
58 PowerCommand resp = PowerCommand_init_zero;
Buffer * ControllerTx(void)
Get reference to transmit buffer.
Buffer * ControllerRx(void)
Get reference to receive buffer.
ControllerStatus ControllerTransaction(void)
Send message and receive response from esp32.
size_t EncodePowerCommand(const PowerCommand *power_cmd, uint8_t *buffer, size_t size)
Encodes a PowerCommand.
Esp32Command DecodeEsp32Command(const uint8_t *data, const size_t len)
Decodes an Esp32Command message.
ControllerStatus PowerCommandTransaction(const PowerCommand *input, PowerCommand *output)
bool ControllerPowerWakeup(void)
bool ControllerPowerSleep(void)
Power interface for the esp32.