From 2f60747dd3b51321903de9c51789765d41ed83e4 Mon Sep 17 00:00:00 2001 From: ozpv <39195175+ozpv@users.noreply.github.com> Date: Mon, 17 Aug 2026 00:01:22 -0500 Subject: audio driver --- Core/Inc/cs4272.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 Core/Inc/cs4272.h (limited to 'Core/Inc/cs4272.h') diff --git a/Core/Inc/cs4272.h b/Core/Inc/cs4272.h new file mode 100755 index 0000000..30e493a --- /dev/null +++ b/Core/Inc/cs4272.h @@ -0,0 +1,35 @@ +/* + * cs4272.h + * + * Created on: Aug 16, 2026 + * Author: ozpv + */ + +#ifndef INC_CS4272_H_ +#define INC_CS4272_H_ + +// cs4272k-czzr 7. REGISTER QUICK REFERENCE +#define MODE_CONTROL_1 0x01 +#define DAC_CONTROL 0x02 +#define DAC_VOLUME_AND_MIXING_CONTROL 0x03 +#define DAC_CH_A_VOLUME_CONTROL 0x04 +#define DAC_CH_B_VOLUME_CONTROL 0x05 +#define ADC_CONTROL 0x06 +#define MODE_CONTROL_2 0x07 +#define CHIP_ID 0x08 + +#define CS4272_CHIP_ID 0x0 + +// set by ncs/ad0 pin +#define CS4272_I2C_ADDR (0b0010000 << 1) + +#define BUFFER_SIZE 512 + +extern volatile int32_t rx_buffer[BUFFER_SIZE]; +extern volatile int32_t tx_buffer[BUFFER_SIZE]; + +extern const uint8_t CS4272_CONFIG[7]; + +uint8_t CS4272_Init(); + +#endif /* INC_CS4272_H_ */ -- cgit v1.2.3