added some comments and removed the pointer back to device since it was unused
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "../device.h"
|
||||
#include <stdio.h>
|
||||
|
||||
// this is me being lazy
|
||||
const char off_state_name[] = __FILE_NAME__;
|
||||
|
||||
static void pressPwrMethod(Device_t *device) {
|
||||
@@ -10,11 +11,13 @@ static void pressPwrMethod(Device_t *device) {
|
||||
}
|
||||
|
||||
static void pressStrInputMethod(Device_t *device) {
|
||||
// cast it to void since its unused
|
||||
(void) device;
|
||||
printf("nothing happens\n");
|
||||
}
|
||||
|
||||
static void pressLockMethod(Device_t *device) {
|
||||
// cast it to void since its unused
|
||||
(void) device;
|
||||
printf("nothing happens\n");
|
||||
}
|
||||
@@ -22,7 +25,6 @@ static void pressLockMethod(Device_t *device) {
|
||||
void setDeviceStateToOff(Device_t *device) {
|
||||
device->state = (DeviceState_t){
|
||||
.state_name = off_state_name,
|
||||
.device = device,
|
||||
.methods = (DeviceInterface_t){
|
||||
.pressPwr = &pressPwrMethod,
|
||||
.pressStrInput = &pressStrInputMethod,
|
||||
|
||||
Reference in New Issue
Block a user