|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Native serial mini-module for direct GPIO / ADC / I2C poking. More...
#include "cdc_log.h"#include "plugin_manager/PluginGpioPolicy.h"#include "serial_cmd/ICommandRegistry.h"#include "HexUtil.h"#include "driver/gpio.h"#include "driver/i2c.h"#include "esp_adc/adc_oneshot.h"#include <cstdio>#include <cstdlib>#include <cstring>Go to the source code of this file.
Namespaces | |
| namespace | cdc |
| namespace | cdc::plugin_manager |
Functions | |
| void | cdc::plugin_manager::registerGpioSerialCommands () |
Variables | |
| static const char * | cdc::plugin_manager::TAG = "GPIO_CMD" |
| static const char * | cdc::plugin_manager::CMD_MODULE = "gpio" |
Native serial mini-module for direct GPIO / ADC / I2C poking.
Same pin whitelist + hard block list as the plugin GPIO host API. No capability check (the user is physically holding the badge), but firmware- internal pins (TROPIC01 SPI, display SPI, charger, USB, PSRAM) are still blocked at the static block list level.
Subcommands: GPIO LIST pins on the whitelist + current mode GPIO MODE <pin> in|out|out_od [pull_up|pull_down|none] GPIO WRITE <pin> 0|1 GPIO READ <pin> GPIO RELEASE <pin> ADC READ <pin> oneshot ADC (mV) I2C SCAN <bus> list 7-bit addrs that ACK
Definition in file GpioSerialCommands.cpp.