mirror of
https://github.com/marqs85/ossc
synced 2026-10-31 12:17:17 +03:00
Fix PCM1862 input selection.
This commit is contained in:
1 parent
a8887ce47d
commit
2cd36cdd37
7 files changed
+963
-949
No files matched your search
@@ -41,8 +41,8 @@ inline void pcm1862_writereg(alt_u8 regaddr, alt_u8 data)
|
||||
I2C_write(I2CA_BASE, data, 1);
|
||||
}
|
||||
|
||||
void pcm_source_sel(tvp_input_t input) {
|
||||
alt_u8 adc_ch = 1<<(3-input);
|
||||
void pcm_source_sel(pcm_input_t input) {
|
||||
alt_u8 adc_ch = 1<<input;
|
||||
|
||||
pcm1862_writereg(PCM1862_ADC1L, adc_ch);
|
||||
pcm1862_writereg(PCM1862_ADC1R, adc_ch);
|
||||
|
||||
@@ -22,9 +22,15 @@
|
||||
|
||||
#include "pcm1862_regs.h"
|
||||
#include "sysconfig.h"
|
||||
#include "tvp7002.h"
|
||||
|
||||
void pcm_source_sel(tvp_input_t input) ;
|
||||
typedef enum {
|
||||
PCM_INPUT1 = 0,
|
||||
PCM_INPUT2 = 1,
|
||||
PCM_INPUT3 = 2,
|
||||
PCM_INPUT4 = 3
|
||||
} pcm_input_t;
|
||||
|
||||
void pcm_source_sel(pcm_input_t input) ;
|
||||
|
||||
int pcm1862_init();
|
||||
|
||||
|
||||
Reference in new issue
Block a user