From 2bee3914691a8e4946e2bc1766356592369dbb5a Mon Sep 17 00:00:00 2001 From: true Date: Wed, 6 Nov 2024 20:12:48 -0800 Subject: [PATCH] moved USB directory --- gat_stand_fw/usblib/config/usb_endp.c | 2 +- gat_stand_fw/usblib/config/usb_prop.c | 2 +- gat_stand_fw/usblib/config/usb_pwr.h | 28 ++++++++++++------------ gat_stand_fw/user/main.c | 14 +++++++++++- gat_stand_fw/user/{ => periph}/usb/cdc.c | 0 gat_stand_fw/user/{ => periph}/usb/cdc.h | 0 6 files changed, 29 insertions(+), 17 deletions(-) rename gat_stand_fw/user/{ => periph}/usb/cdc.c (100%) rename gat_stand_fw/user/{ => periph}/usb/cdc.h (100%) diff --git a/gat_stand_fw/usblib/config/usb_endp.c b/gat_stand_fw/usblib/config/usb_endp.c index de0bebe..ef6e4c4 100644 --- a/gat_stand_fw/usblib/config/usb_endp.c +++ b/gat_stand_fw/usblib/config/usb_endp.c @@ -18,7 +18,7 @@ #include "usb_prop.h" #include "usb_pwr.h" -#include "../../user/usb/cdc.h" +#include "periph/usb/cdc.h" diff --git a/gat_stand_fw/usblib/config/usb_prop.c b/gat_stand_fw/usblib/config/usb_prop.c index 39e7daf..a10e721 100644 --- a/gat_stand_fw/usblib/config/usb_prop.c +++ b/gat_stand_fw/usblib/config/usb_prop.c @@ -16,7 +16,7 @@ #include "usb_desc.h" #include "usb_pwr.h" -#include "../../user/usb/cdc.h" +#include "periph/usb/cdc.h" diff --git a/gat_stand_fw/usblib/config/usb_pwr.h b/gat_stand_fw/usblib/config/usb_pwr.h index 9c0735c..af44bd1 100644 --- a/gat_stand_fw/usblib/config/usb_pwr.h +++ b/gat_stand_fw/usblib/config/usb_pwr.h @@ -26,24 +26,24 @@ typedef enum _RESUME_STATE { - RESUME_EXTERNAL, - RESUME_INTERNAL, - RESUME_LATER, - RESUME_WAIT, - RESUME_START, - RESUME_ON, - RESUME_OFF, - RESUME_ESOF + RESUME_EXTERNAL, + RESUME_INTERNAL, + RESUME_LATER, + RESUME_WAIT, + RESUME_START, + RESUME_ON, + RESUME_OFF, + RESUME_ESOF } RESUME_STATE; typedef enum _DEVICE_STATE { - UNCONNECTED, - ATTACHED, - POWERED, - SUSPENDED, - ADDRESSED, - CONFIGURED + UNCONNECTED, + ATTACHED, + POWERED, + SUSPENDED, + ADDRESSED, + CONFIGURED } DEVICE_STATE; diff --git a/gat_stand_fw/user/main.c b/gat_stand_fw/user/main.c index 12acd2e..e4834c2 100644 --- a/gat_stand_fw/user/main.c +++ b/gat_stand_fw/user/main.c @@ -5,9 +5,21 @@ * * version 0.0.1 * + * * notes: * * - last 2K of flash memory is reserved for configuration storage + * + * + * project todo: + * + * - implement config storage + * + * - implement USB CDC commmand shell + * + * - when USB is not active, go into super low power state + * - light sensor is only checked once every two seconds or so + * - buttons are on wakeup */ #include @@ -19,7 +31,7 @@ #include "periph/rgbled.h" #include "periph/rtc.h" -#include "usb/cdc.h" +#include "periph/usb/cdc.h" #include "usb_lib.h" diff --git a/gat_stand_fw/user/usb/cdc.c b/gat_stand_fw/user/periph/usb/cdc.c similarity index 100% rename from gat_stand_fw/user/usb/cdc.c rename to gat_stand_fw/user/periph/usb/cdc.c diff --git a/gat_stand_fw/user/usb/cdc.h b/gat_stand_fw/user/periph/usb/cdc.h similarity index 100% rename from gat_stand_fw/user/usb/cdc.h rename to gat_stand_fw/user/periph/usb/cdc.h