forked from len0rd/rockbox
M:Robe 500: Add support for more audio frequencies, initialize and set the touchscreen PWD pin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23089 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
14079c39f0
commit
173d854e7f
3 changed files with 29 additions and 2 deletions
|
@ -116,5 +116,23 @@ void audiohw_close(void)
|
|||
|
||||
void audiohw_set_frequency(int fsel)
|
||||
{
|
||||
(void)fsel;
|
||||
int reg_val;
|
||||
reg_val = tsc2100_readreg(TSAC1_PAGE, TSAC1_ADDRESS);
|
||||
|
||||
reg_val &= ~(0x07<<3);
|
||||
|
||||
switch(fsel)
|
||||
{
|
||||
case HW_FREQ_8:
|
||||
reg_val |= (0x06<<3);
|
||||
break;
|
||||
case HW_FREQ_11:
|
||||
reg_val |= (0x04<<3);
|
||||
break;
|
||||
case HW_FREQ_44:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
tsc2100_writereg(TSAC1_PAGE, TSAC1_ADDRESS, reg_val);
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
#define PLUGIN_BUFFER_SIZE 0x200000
|
||||
#endif
|
||||
|
||||
#define HW_SAMPR_CAPS SAMPR_CAP_44
|
||||
#define HW_SAMPR_CAPS SAMPR_CAP_44 | SAMPR_CAP_22 | SAMPR_CAP_11 | SAMPR_CAP_8
|
||||
|
||||
#define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */
|
||||
#define BATTERY_CAPACITY_MIN 1000 /* min. capacity selectable */
|
||||
|
|
|
@ -28,6 +28,15 @@
|
|||
|
||||
void adc_init(void)
|
||||
{
|
||||
/* Pin 15 appears to be the nPWD pin - make sure it is high otherwise the
|
||||
* touchscreen does not work, audio has not been tested, but it is
|
||||
* expected that is will also not work when low.
|
||||
*/
|
||||
IO_GIO_DIR0 &= ~(1<<15); /* output */
|
||||
IO_GIO_INV0 &= ~(1<<15); /* non-inverted */
|
||||
IO_GIO_FSEL0 &= ~(0x03<<12); /* normal pin */
|
||||
IO_GIO_BITSET0 = (1<<15);
|
||||
|
||||
/* Initialize the touchscreen and the battery readout */
|
||||
tsc2100_adc_init();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue