mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-01-27 07:47:04 -05:00
Raise UART IRQ priority and tune USB polling period
Set UART1 IRQ to high priority to not miss any incoming bytes and tune USB polling period (bInterval).
This commit is contained in:
parent
68cecdfa92
commit
9828e1d51b
@ -151,6 +151,7 @@ inline void UART1Setup()
|
||||
// Should correct for rounding in SBAUD1 calculation
|
||||
SBAUD1 = 256 - FREQ_SYS/16/UART1_BAUD; // Calculation for Fast mode
|
||||
IE_UART1 = 1; // Enable UART1 interrupt
|
||||
IP_EX = bIP_UART1; // Serial port IRQ has high priority
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -55,10 +55,10 @@ USB_SETUP_REQ SetupReqBuf = { 0 }; // Temporary Setup package
|
||||
#define TKEYCTRL_EPIN_ADDR 0x84 // TKEYCTRL Endpoint IN Address
|
||||
#define TKEYCTRL_EPIN_SIZE MAX_PACKET_SIZE // TKEYCTRL Endpoint IN Size
|
||||
|
||||
#define CDC_CTRL_FS_BINTERVAL 0xFF // Gives 32 ms polling interval at Full Speed
|
||||
#define CDC_DATA_FS_BINTERVAL 10 // Gives 8 ms polling interval at Full Speed
|
||||
#define HID_FS_BINTERVAL 10 // Gives 8 ms polling interval at Full Speed
|
||||
#define TKEYCTRL_FS_BINTERVAL 10 // Gives 8 ms polling interval at Full Speed
|
||||
#define CDC_CTRL_FS_BINTERVAL 32 // Gives 32 ms polling interval at Full Speed for interrupt transfers
|
||||
#define CDC_DATA_FS_BINTERVAL 0 // bInterval is ignored for BULK transfers
|
||||
#define HID_FS_BINTERVAL 2 // Gives 2 ms polling interval at Full Speed for interrupt transfers
|
||||
#define TKEYCTRL_FS_BINTERVAL 2 // Gives 2 ms polling interval at Full Speed for interrupt transfers
|
||||
|
||||
#define CFGDESC_SIZE 139U // Size of CfgDesc
|
||||
#define NUM_INTERFACES 4 // Number of interfaces
|
||||
|
Loading…
x
Reference in New Issue
Block a user