Seems to be compiling now...finally after many months.
This commit is contained in:
parent
d1f1128f6a
commit
5226cdd252
4
main.c
4
main.c
@ -272,7 +272,7 @@ void keyPressDetection( uint8_t *keys, uint8_t *validKeys, uint8_t numberOfKeys,
|
|||||||
for ( uint8_t key = 0; key < numberOfKeys + 1; key++ ) {
|
for ( uint8_t key = 0; key < numberOfKeys + 1; key++ ) {
|
||||||
if ( keys[key] & (1 << 7) ) {
|
if ( keys[key] & (1 << 7) ) {
|
||||||
pint8( key );
|
pint8( key );
|
||||||
print(" ");
|
//print(" ");
|
||||||
uint8_t modFound = 0;
|
uint8_t modFound = 0;
|
||||||
|
|
||||||
// Determine if the key is a modifier
|
// Determine if the key is a modifier
|
||||||
@ -402,7 +402,7 @@ int main( void )
|
|||||||
|
|
||||||
keyPressDetection( keyDetectArray, &validKeys, KEYBOARD_SIZE, keyboard_MODMASK, keyboard_NUMMODS, keyboard_MAP );
|
keyPressDetection( keyDetectArray, &validKeys, KEYBOARD_SIZE, keyboard_MODMASK, keyboard_NUMMODS, keyboard_MAP );
|
||||||
keyPressDetection( keypadDetectArray, &validKeys, KEYPAD_SIZE, keypad_MODMASK, keypad_NUMMODS, keypad_MAP );
|
keyPressDetection( keypadDetectArray, &validKeys, KEYPAD_SIZE, keypad_MODMASK, keypad_NUMMODS, keypad_MAP );
|
||||||
print(":\n");
|
//print(":\n");
|
||||||
|
|
||||||
// TODO undo potentially old keys
|
// TODO undo potentially old keys
|
||||||
for ( uint8_t c = validKeys; c < 6; c++ )
|
for ( uint8_t c = validKeys; c < 6; c++ )
|
||||||
|
@ -94,7 +94,7 @@ static const uint8_t PROGMEM endpoint_config_table[] = {
|
|||||||
// spec and relevant portions of any USB class specifications!
|
// spec and relevant portions of any USB class specifications!
|
||||||
|
|
||||||
|
|
||||||
static uint8_t PROGMEM device_descriptor[] = {
|
static const uint8_t PROGMEM device_descriptor[] = {
|
||||||
18, // bLength
|
18, // bLength
|
||||||
1, // bDescriptorType
|
1, // bDescriptorType
|
||||||
0x00, 0x02, // bcdUSB
|
0x00, 0x02, // bcdUSB
|
||||||
@ -112,7 +112,7 @@ static uint8_t PROGMEM device_descriptor[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Keyboard Protocol 1, HID 1.11 spec, Appendix B, page 59-60
|
// Keyboard Protocol 1, HID 1.11 spec, Appendix B, page 59-60
|
||||||
static uint8_t PROGMEM keyboard_hid_report_desc[] = {
|
static const uint8_t PROGMEM keyboard_hid_report_desc[] = {
|
||||||
0x05, 0x01, // Usage Page (Generic Desktop),
|
0x05, 0x01, // Usage Page (Generic Desktop),
|
||||||
0x09, 0x06, // Usage (Keyboard),
|
0x09, 0x06, // Usage (Keyboard),
|
||||||
0xA1, 0x01, // Collection (Application),
|
0xA1, 0x01, // Collection (Application),
|
||||||
@ -147,7 +147,7 @@ static uint8_t PROGMEM keyboard_hid_report_desc[] = {
|
|||||||
0xc0 // End Collection
|
0xc0 // End Collection
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t PROGMEM debug_hid_report_desc[] = {
|
static const uint8_t PROGMEM debug_hid_report_desc[] = {
|
||||||
0x06, 0x31, 0xFF, // Usage Page 0xFF31 (vendor defined)
|
0x06, 0x31, 0xFF, // Usage Page 0xFF31 (vendor defined)
|
||||||
0x09, 0x74, // Usage 0x74
|
0x09, 0x74, // Usage 0x74
|
||||||
0xA1, 0x53, // Collection 0x53
|
0xA1, 0x53, // Collection 0x53
|
||||||
@ -163,7 +163,7 @@ static uint8_t PROGMEM debug_hid_report_desc[] = {
|
|||||||
#define CONFIG1_DESC_SIZE (9+9+9+7+9+9+7)
|
#define CONFIG1_DESC_SIZE (9+9+9+7+9+9+7)
|
||||||
#define KEYBOARD_HID_DESC_OFFSET (9+9)
|
#define KEYBOARD_HID_DESC_OFFSET (9+9)
|
||||||
#define DEBUG_HID_DESC_OFFSET (9+9+9+7+9)
|
#define DEBUG_HID_DESC_OFFSET (9+9+9+7+9)
|
||||||
static uint8_t PROGMEM config1_descriptor[CONFIG1_DESC_SIZE] = {
|
static const uint8_t PROGMEM config1_descriptor[CONFIG1_DESC_SIZE] = {
|
||||||
// configuration descriptor, USB spec 9.6.3, page 264-266, Table 9-10
|
// configuration descriptor, USB spec 9.6.3, page 264-266, Table 9-10
|
||||||
9, // bLength;
|
9, // bLength;
|
||||||
2, // bDescriptorType;
|
2, // bDescriptorType;
|
||||||
@ -236,17 +236,17 @@ struct usb_string_descriptor_struct {
|
|||||||
uint8_t bDescriptorType;
|
uint8_t bDescriptorType;
|
||||||
int16_t wString[];
|
int16_t wString[];
|
||||||
};
|
};
|
||||||
static struct usb_string_descriptor_struct PROGMEM string0 = {
|
static const struct usb_string_descriptor_struct PROGMEM string0 = {
|
||||||
4,
|
4,
|
||||||
3,
|
3,
|
||||||
{0x0409}
|
{0x0409}
|
||||||
};
|
};
|
||||||
static struct usb_string_descriptor_struct PROGMEM string1 = {
|
static const struct usb_string_descriptor_struct PROGMEM string1 = {
|
||||||
sizeof(STR_MANUFACTURER),
|
sizeof(STR_MANUFACTURER),
|
||||||
3,
|
3,
|
||||||
STR_MANUFACTURER
|
STR_MANUFACTURER
|
||||||
};
|
};
|
||||||
static struct usb_string_descriptor_struct PROGMEM string2 = {
|
static const struct usb_string_descriptor_struct PROGMEM string2 = {
|
||||||
sizeof(STR_PRODUCT),
|
sizeof(STR_PRODUCT),
|
||||||
3,
|
3,
|
||||||
STR_PRODUCT
|
STR_PRODUCT
|
||||||
@ -254,7 +254,7 @@ static struct usb_string_descriptor_struct PROGMEM string2 = {
|
|||||||
|
|
||||||
// This table defines which descriptor data is sent for each specific
|
// This table defines which descriptor data is sent for each specific
|
||||||
// request from the host (in wValue and wIndex).
|
// request from the host (in wValue and wIndex).
|
||||||
static struct descriptor_list_struct {
|
static const struct descriptor_list_struct {
|
||||||
uint16_t wValue;
|
uint16_t wValue;
|
||||||
uint16_t wIndex;
|
uint16_t wIndex;
|
||||||
const uint8_t *addr;
|
const uint8_t *addr;
|
||||||
|
Reference in New Issue
Block a user