Skip to content

Instantly share code, notes, and snippets.

@pamaury
pamaury / regs-int.h
Created September 16, 2015 11:04
header file
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* This file was automatically generated by headergen, DO NOT EDIT it.
* headergen version: 3.0.0
* vsoc2000 version: 0.5
@pamaury
pamaury / regs-tz.h
Created September 16, 2015 11:05
header file
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* This file was automatically generated by headergen, DO NOT EDIT it.
* headergen version: 3.0.0
* vsoc2000 version: 0.5
@pamaury
pamaury / regs-example.c
Created September 16, 2015 11:13
example usage
unsigned long value = HW_ICOLL_STATUS; /* read register */
unsigned long status = BR_ICOLL_STATUS(STATUS); /* read register and extract field */
BW_ICOLL_CLR(STATUS(status)); /* (clear interrupt) write register (CLR variant) */
unsigned long ctrl_addr = HW_ICOLL_CTRL_ADDR; /* get address */
/* write register (CLR variant) by ORing fields */
BW_ICOLL_CTRL_CLR(SFTRST(1), CLKGATE(1));
/* write register by ORing fields */
BW_ICOLL_CTRL(TZ_LOCK_V(LOCKED));
/* you can do any combination of the above, using indexes too */
BW_ICOLL_ENABLE(10, CPU0_TZ(1), CPU0_TYPE_V(FIQ), CPU0_PRIO(NMI), CPU1_PRIO(MASKED), CPU2_PRIO(MASKED), CPU3_PRIO(MASKED));
#invocation ./check_defines.sh ../www/buildserver/builds USB_ENABLE_HID
iriverh100: <make error>
iriverh120: <make error>
iriverh300: <make error>
iaudiox5: <make error>
iaudiom5: <make error>
iaudiom3: <make error>
mpiohd200: <make error>
mpiohd300: <make error>
ipodnano1g: USB_ENABLE_HID USB_ENABLE_HID
@pamaury
pamaury / sd.diff
Created December 14, 2011 10:25
imx233/fuze+ sd work in progress
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 79a0752..bcbecc7 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1132,7 +1132,9 @@ static bool view_battery(void)
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
-#if (CONFIG_STORAGE & STORAGE_MMC)
+#if (CONFIG_STORAGE & (STORAGE_MMC | STORAGE_SD))
@pamaury
pamaury / touchpad.diff
Created December 26, 2011 17:42
"Natural" Touchpad Driver
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h
index 880bbae..f16f9f1 100644
--- a/firmware/export/config/sansafuzeplus.h
+++ b/firmware/export/config/sansafuzeplus.h
@@ -180,7 +180,7 @@
#define USE_ROCKBOX_USB
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x74e1
-#define HAVE_USB_HID_MOUSE
+#define HAVE_USB_HID_TOUCHPAD
@pamaury
pamaury / jlbiasini.diff
Created January 15, 2012 19:00
MMC panic detail
diff --git a/firmware/target/arm/imx233/mmc-imx233.c b/firmware/target/arm/imx233/mmc-imx233.c
index 8782e8e..7edfc21 100644
--- a/firmware/target/arm/imx233/mmc-imx233.c
+++ b/firmware/target/arm/imx233/mmc-imx233.c
@@ -230,6 +230,8 @@ static int transfer_sectors(IF_MD2(int drive,) unsigned long start, int count, v
ret = imx233_ssp_sd_mmc_transfer(MMC_SSP, read ? 18 : 25, start,
SSP_SHORT_RESP, buf, this_count, false, read, &resp);
}
+ if(ret != 0)
+ panicf("resp: %x", resp);
@pamaury
pamaury / fuzep_radio.diff
Created February 2, 2012 15:12
fuze+ radio
diff --git a/apps/radio/radio.c b/apps/radio/radio.c
index e9de69b..ad6071b 100644
--- a/apps/radio/radio.c
+++ b/apps/radio/radio.c
@@ -193,7 +193,7 @@ void radio_start(void)
radio_status &= ~FMRADIO_START_PAUSED;
if(radio_status == FMRADIO_OFF)
- tuner_power(true);
+ tuner_set(RADIO_POWER, 1);
@pamaury
pamaury / mmc_read.sh
Created February 6, 2012 17:09
mmc reading with recoveyr_util
./sbloader 0 recovery.sb && \
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata noresp 0 0 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata noresp 0 0 - &&
for i in $(seq 0 30); do
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 1 0x40ff8000 -
done &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata longresp 2 0 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 3 0x10000 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 7 0x10000 - &&
./util_reader/read_util 066f:3780 ssp_cmd 2 nodata resp 13 0x10000 - &&
@pamaury
pamaury / tryread.diff
Created March 16, 2012 15:26
Check if an address is readable in Rockbox
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c
index a5b004a..f3bac29 100644
--- a/firmware/drivers/tuner/si4700.c
+++ b/firmware/drivers/tuner/si4700.c
@@ -355,6 +355,7 @@ static void si4700_sleep(int snooze)
bool si4700_detect(void)
{
+ panicf("read: %d", safe_read8(0x40000000, NULL));
if (!tuner_present) {