mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
erosqnative hw1/hw2: Check for DAC in bootloader
Check for the ES9018K2M dac in the bootloader for hw1/hw2 devices. Assume that all devices newer than hw2 have ES9018K2M DAC unconditionally. All devices will now report the correct hw revision in the debug menu under Device Data. Add devicedata.version field, current version 0. Rename device_data.lcd_version to device_data.hw_rev. hw2 devices with older bootloaders which ID as hw1 are special- cased to keep using hwvol on them. They should still upgrade though. Change-Id: If0fd5ce3bc6e85e511047721ec18e42fb89312e7
This commit is contained in:
parent
f895167345
commit
adbd0125fd
13 changed files with 110 additions and 38 deletions
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#define DEVICE_DATA_MAGIC0 ('r' | 'b' << 8 | 'd' << 16 | 'e' << 24)
|
||||
#define DEVICE_DATA_MAGIC1 ('v' | 'i' << 8 | 'c' << 16 | 'e' << 24)
|
||||
#define DEIVCE_DATA_VERSION 0
|
||||
|
||||
/* maximum size of payload */
|
||||
#define DEVICE_DATA_PAYLOAD_SIZE 4
|
||||
|
|
@ -59,8 +60,9 @@ struct device_data_t
|
|||
struct
|
||||
{
|
||||
#if defined(EROS_QN)
|
||||
uint8_t lcd_version;
|
||||
uint8_t hw_rev;
|
||||
#endif
|
||||
uint8_t version;
|
||||
};
|
||||
uint8_t payload[DEVICE_DATA_PAYLOAD_SIZE];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -53,4 +53,10 @@ void eros_qn_set_outputs(void);
|
|||
/* returns (global_settings.volume_limit * 10) */
|
||||
int eros_qn_get_volume_limit(void);
|
||||
|
||||
/* powers on the dac and tries to speak over i2c.
|
||||
* will return 1 if es9018k2m, 0 if non-i2c dac.
|
||||
* if pwr_after_discovery = 1, leave dac powered up.
|
||||
* if 0, power down dac. */
|
||||
bool eros_qn_discover_dac(bool pwr_after_discovery);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue