USB Suspend for arm_atsam protocol
Rewrote USB state tracking for implementation of suspend state. Updated suspend.c in entirety. Main subtasks (generally hardware related) are now run prior to keyboard task.
This commit is contained in:
committed by
Drashna Jaelre
parent
563fe23e53
commit
cec203ea80
@@ -52,8 +52,6 @@
|
||||
#include "samd51j18a.h"
|
||||
#include "ui.h"
|
||||
|
||||
volatile uint8_t usb_state;
|
||||
|
||||
//! Sequence process running each \c SEQUENCE_PERIOD ms
|
||||
#define SEQUENCE_PERIOD 150
|
||||
|
||||
@@ -72,12 +70,12 @@ static void ui_wakeup_handler(void)
|
||||
|
||||
void ui_init(void)
|
||||
{
|
||||
usb_state = USB_STATE_POWERUP;
|
||||
|
||||
}
|
||||
|
||||
void ui_powerdown(void)
|
||||
{
|
||||
usb_state = USB_STATE_POWERDOWN;
|
||||
|
||||
}
|
||||
|
||||
void ui_wakeup_enable(void)
|
||||
@@ -92,7 +90,7 @@ void ui_wakeup_disable(void)
|
||||
|
||||
void ui_wakeup(void)
|
||||
{
|
||||
usb_state = USB_STATE_POWERUP;
|
||||
|
||||
}
|
||||
|
||||
void ui_process(uint16_t framenumber)
|
||||
|
||||
@@ -47,12 +47,6 @@
|
||||
#ifndef _UI_H_
|
||||
#define _UI_H_
|
||||
|
||||
extern volatile uint8_t usb_state;
|
||||
|
||||
#define USB_STATE_UNKNOWN 0
|
||||
#define USB_STATE_POWERDOWN 1
|
||||
#define USB_STATE_POWERUP 2
|
||||
|
||||
//! \brief Initializes the user interface
|
||||
void ui_init(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user