forked from len0rd/rockbox
init spi and uart in the main build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15195 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2640bdb262
commit
61f1ab27ff
2 changed files with 6 additions and 3 deletions
|
|
@ -127,9 +127,10 @@ void mrdebug(void)
|
||||||
else if (button==BUTTON_RC_REW)
|
else if (button==BUTTON_RC_REW)
|
||||||
address-=0x1000;
|
address-=0x1000;
|
||||||
{
|
{
|
||||||
|
extern int irq_count;
|
||||||
short x,y,z1,z2;
|
short x,y,z1,z2;
|
||||||
tsc2100_read_values(&x, &y, &z1, &z2);
|
tsc2100_read_values(&x, &y, &z1, &z2);
|
||||||
printf("x: %04x y: %04x z1: %04x z2: %04x", x, y, z1, z2);
|
printf("%d, x: %04x y: %04x z1: %04x z2: %04x", irq_count,x, y, z1, z2);
|
||||||
printf("tsadc: %4x", tsc2100_readreg(TSADC_PAGE, TSADC_ADDRESS)&0xffff);
|
printf("tsadc: %4x", tsc2100_readreg(TSADC_PAGE, TSADC_ADDRESS)&0xffff);
|
||||||
printf("current tick: %04x", current_tick);
|
printf("current tick: %04x", current_tick);
|
||||||
printf("Address: 0x%08x Data: 0x%08x", address, *address);
|
printf("Address: 0x%08x Data: 0x%08x", address, *address);
|
||||||
|
|
@ -167,10 +168,8 @@ void main(void)
|
||||||
adc_init();
|
adc_init();
|
||||||
button_init();
|
button_init();
|
||||||
backlight_init();
|
backlight_init();
|
||||||
uart_init();
|
|
||||||
|
|
||||||
font_init();
|
font_init();
|
||||||
spi_init();
|
|
||||||
|
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "panic.h"
|
#include "panic.h"
|
||||||
|
#include "uart-target.h"
|
||||||
|
#include "spi.h"
|
||||||
|
|
||||||
#define default_interrupt(name) \
|
#define default_interrupt(name) \
|
||||||
extern __attribute__((weak,alias("UIRQ"))) void name (void)
|
extern __attribute__((weak,alias("UIRQ"))) void name (void)
|
||||||
|
|
@ -175,6 +177,8 @@ void system_init(void)
|
||||||
IO_GIO_DIR1&=~(1<<10);
|
IO_GIO_DIR1&=~(1<<10);
|
||||||
|
|
||||||
enable_interrupts();
|
enable_interrupts();
|
||||||
|
uart_init();
|
||||||
|
spi_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
int system_memory_guard(int newmode)
|
int system_memory_guard(int newmode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue