X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?p=my-code%2Farm.git;a=blobdiff_plain;f=betty%2Fsystem.c;h=b181733006531a71109448dd790a3156a76b8e56;hp=4204cddeca087f57a6359b5349c8d5a1ee5b5457;hb=HEAD;hpb=800e17e9826d024a38edb45b59de7953394002d2 diff --git a/betty/system.c b/betty/system.c index 4204cdd..b181733 100644 --- a/betty/system.c +++ b/betty/system.c @@ -64,19 +64,21 @@ void pin_init(void) { * pinsel 0 * * uart0: tx, rx + * p0.7: pwm2 + * p0.11: gpio -> audio (leave as is) * */ - PINSEL0=0x00000005; + PINSEL0=0x00008005; /* * pinsel 1 * - * no special function yet! + * p0.30: eint3 * */ - PINSEL1=0x00000000; + PINSEL1=0x20000000; /* * pin select 2 @@ -107,8 +109,14 @@ void pin_init(void) { * out: p2.18 - p2.24 (+ pull high) * in: p0.30, p0.{27,28}, p3.{20,21}, p0.22, p0.13 * + * audio: + * + * p0.11: out + * */ + //IODIR0=(1<<11); + // nothing to do for inputs (default: 0x00000000) IODIR2=((1<<18)|(1<<19)|(1<<20)|(1<<21)|(1<<22)|(1<<23)|(1<<24)); IOSET2=((1<<18)|(1<<19)|(1<<20)|(1<<21)|(1<<22)|(1<<23)|(1<<24)); @@ -116,6 +124,9 @@ void pin_init(void) { void mmap_init(u8 memtype) { + if(memtype==MEMTYPE_RESERVED) + return; + MEMMAP=memtype; }