firmware wip2

This commit is contained in:
Pavol Rusnak 2011-04-04 21:38:39 +02:00
parent b46d41bd34
commit 3bb2e1d076
3 changed files with 7 additions and 4 deletions

1
firmware/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
test

View file

@ -29,5 +29,5 @@ deploy:
crt_emu_lpc11_13_nxp -g -2 -pLPC1343 -wire=winusb -flash-erase
crt_emu_lpc11_13_nxp -g -2 -pLPC1343 -wire=winusb -flash-load=obj/$(NAME).axf
test:
test: test.c
gcc test.c -o test -lusb-1.0

View file

@ -22,6 +22,8 @@
#include "rom_drivers.h"
#include "config.h"
#include <string.h>
#define EN_TIMER32_1 (1<<10)
#define EN_IOCON (1<<16)
#define EN_USBREG (1<<14)
@ -34,11 +36,11 @@ ROM ** rom = (ROM **)0x1fff1ff8;
* Get HID Input Report -> InReport
*/
volatile uint8_t buffer[8];
static uint8_t buffer[64];
void GetInReport (uint8_t src[], uint32_t length)
{
src[0] = buffer[0];
memcpy(src, buffer, length);
}
/*
@ -46,7 +48,7 @@ void GetInReport (uint8_t src[], uint32_t length)
*/
void SetOutReport (uint8_t dst[], uint32_t length)
{
buffer[0] = dst[0];
memcpy(buffer, dst, length);
}
int main (void)