added some comments and removed the pointer back to device since it was unused
This commit is contained in:
@@ -13,6 +13,8 @@ static void pressPwrMethod(Device_t *device) {
|
||||
}
|
||||
|
||||
static void pressStrInputMethod(Device_t *device) {
|
||||
|
||||
// check to see if the entered string is the one to enter the debug state
|
||||
if (strcmp(device->entered_string, "dbg") == 0) {
|
||||
printf("entering debug state\n");
|
||||
setDeviceStateToDebug(device);
|
||||
@@ -27,9 +29,8 @@ static void pressLockMethod(Device_t *device) {
|
||||
}
|
||||
|
||||
void setDeviceStateToUnlock(Device_t *device) {
|
||||
device->state = (DeviceState_t){
|
||||
device->state = (DeviceState_t) {
|
||||
.state_name = name,
|
||||
.device = device,
|
||||
.methods = (DeviceInterface_t){
|
||||
.pressPwr = &pressPwrMethod,
|
||||
.pressStrInput = &pressStrInputMethod,
|
||||
|
||||
Reference in New Issue
Block a user