add missing include

This commit is contained in:
Markus Fröschle
2017-01-15 14:17:57 +00:00
parent 9038bb15ae
commit 48bbc4cfc9
3 changed files with 9 additions and 20 deletions

View File

@@ -46,7 +46,7 @@ static inline uint16_t swpw(uint16_t w)
static inline uint32_t swpl(uint32_t l) static inline uint32_t swpl(uint32_t l)
{ {
return ((l & 0xff000000) >> 24) | ((l & 0x00ff0000) >> 8) | return ((l & 0xff000000) >> 24) | ((l & 0x00ff0000) >> 8) |
((l & 0x0000ff00) << 8) | (l << 24); ((l & 0x0000ff00) << 8) | (l << 24);
} }

View File

@@ -133,20 +133,8 @@ void atari_io_test(void)
void do_tests(void) void do_tests(void)
{ {
volatile unsigned long *t1 = (volatile unsigned long *) 0xf0000000; atari_io_test();
volatile unsigned short *t2 = (volatile unsigned short *) 0xf0000000; firebee_io_test();
volatile unsigned short *t3 = (volatile unsigned short *) 0xf0000002;
long value = 0;
while (1)
{
*t1 = value;
*t2 = (short) value;
*t3 = (short) (value >> 16);
xprintf("W: 0x%lx R: 0x%lx W: 0x%04x R: 0x%04x W: 0x%04x R: 0x%04x\r\n", value, *t1,
(unsigned short) value, *t2, (unsigned short)(value >> 16), *t3);
value++;
}
} }

View File

@@ -26,6 +26,7 @@
*/ */
#include "usb.h" #include "usb.h"
#include "exceptions.h"
// #define DEBUG // #define DEBUG
#include "debug.h" #include "debug.h"
@@ -37,7 +38,7 @@ static int usb_kbd_get_hid_desc(struct usb_device *dev);
/* under TOS Repeat keys are build by timer C so infinite (0) or 1000 is a good value */ /* under TOS Repeat keys are build by timer C so infinite (0) or 1000 is a good value */
#define REPEAT_RATE 0 // 40 /* 40msec -> 25cps */ #define REPEAT_RATE 0 // 40 /* 40msec -> 25cps */
#define MAX_VALUE_LOOKUP 0x90 #define MAX_VALUE_LOOKUP 0x90
#define MAX_VALUE_ATARI 0x75 #define MAX_VALUE_ATARI 0x75
#define NUM_LOCK 0x53 #define NUM_LOCK 0x53
@@ -196,7 +197,7 @@ static unsigned char usb_kbd_to_atari_fr_modifier[] =
0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0xEA 0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0x00, 0xEA
}; };
static unsigned char usb_kbd_to_atari_fr_unshift[] = static unsigned char usb_kbd_to_atari_fr_unshift[] =
{ {
// A(Q) B C D // A(Q) B C D
0x00, 0x00, 0x00, 0x00, 0x1E, 0x30, 0x2E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x30, 0x2E, 0x20,
@@ -236,7 +237,7 @@ static unsigned char usb_kbd_to_atari_fr_unshift[] =
0x1D, 0x2A, 0x38, 0x0F, 0x1D, 0x36, 0x00, 0x0F 0x1D, 0x2A, 0x38, 0x0F, 0x1D, 0x36, 0x00, 0x0F
}; };
static unsigned char usb_kbd_to_atari_fr_shift[] = static unsigned char usb_kbd_to_atari_fr_shift[] =
{ {
/* Hexa values, 00: unused => use the Unshift table */ /* Hexa values, 00: unused => use the Unshift table */
/* FF: invalid => no scancode */ /* FF: invalid => no scancode */
@@ -406,7 +407,7 @@ static unsigned char usb_kbd_to_atari_de_unshift[] =
0x1D, 0x2A, 0x38, 0x0F, 0x1D, 0x36, 0x00, 0x0F 0x1D, 0x2A, 0x38, 0x0F, 0x1D, 0x36, 0x00, 0x0F
}; };
static unsigned char usb_kbd_to_atari_de_shift[] = static unsigned char usb_kbd_to_atari_de_shift[] =
{ {
/* Hexa values, 00: unused => use the Unshift table */ /* Hexa values, 00: unused => use the Unshift table */
/* FF: invalid => no scancode */ /* FF: invalid => no scancode */
@@ -1026,7 +1027,7 @@ static int usb_kbd_probe(struct usb_device *dev, unsigned int ifnum)
dbg("USB KBD found, set protocol...\r\n"); dbg("USB KBD found, set protocol...\r\n");
/* ok, we found a USB Keyboard, install it */ /* ok, we found a USB Keyboard, install it */
#ifdef USE_COUNTRYCODE #ifdef USE_COUNTRYCODE
if(usb_kbd_get_hid_desc(dev) < 0) if(usb_kbd_get_hid_desc(dev) < 0)
usb_kbd_hid_desc.bCountryCode = CC_NOT; usb_kbd_hid_desc.bCountryCode = CC_NOT;
#endif #endif