FreeCalypso > hg > freecalypso-tools
changeset 38:c90b1fff224a
pirexplore: buzzer commands added to exercise the vibrator
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 26 Oct 2016 01:09:20 +0000 |
parents | f24b31082605 |
children | 280826b807e3 |
files | target-utils/pirexplore/cmdtab.c target-utils/pirexplore/main.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/target-utils/pirexplore/cmdtab.c Wed Oct 26 00:02:27 2016 +0000 +++ b/target-utils/pirexplore/cmdtab.c Wed Oct 26 01:09:20 2016 +0000 @@ -4,6 +4,8 @@ extern void cmd_abbw(); extern void cmd_baud_switch(); extern void cmd_blit(); +extern void cmd_buz(); +extern void cmd_buzlev(); extern void cmd_dieid(); extern void cmd_find(); extern void cmd_flashid(); @@ -33,6 +35,8 @@ {"abbw", cmd_abbw}, {"baud", cmd_baud_switch}, {"blit", cmd_blit}, + {"buz", cmd_buz}, + {"buzlev", cmd_buzlev}, {"dieid", cmd_dieid}, {"dump", cmd_memdump_human}, {"ffsinit", mpffs_init},
--- a/target-utils/pirexplore/main.c Wed Oct 26 00:02:27 2016 +0000 +++ b/target-utils/pirexplore/main.c Wed Oct 26 01:09:20 2016 +0000 @@ -13,14 +13,17 @@ *(volatile u16 *)0xfffffb02 = 0x00A4; *(volatile u16 *)0xfffffb06 = 0x00A4; *(volatile u16 *)0xfffef006 = 0x0008; + /* setup matching what the official firmware does */ + *(volatile u16 *)0xfffef008 = 0x6050; + *(volatile u16 *)0xfffef00a = 0x021F; /* * Other register settings replicating what OsmocomBB does * in board/pirelli_dpl10/init.c */ - *(volatile u16 *)0xfffef008 = 0x7090; - *(volatile u16 *)0xfffef00a = 0x021F; *(volatile u16 *)0xfffe4804 = 0xFF6D; *(volatile u16 *)0xfffe4802 = 0x0000; + /* enable ARMIO clock in order to exercise buzzer/vibrator */ + *(volatile u16 *)0xfffe4806 = 0xFFF3; /* nCS4 setup for SPCA552E */ *(volatile u16 *)0xfffffb0a = 0x00A7; /* initialize PWL registers like OsmocomBB does */