updates timer and i2s register names
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Generated at 2024-09-10 14:29:50 UTC
|
||||
* Generated at 2024-12-26 18:07:07 UTC
|
||||
* by peakrdl_mnrs version 1.2.9
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@ typedef struct {
|
||||
volatile uint32_t STATUS;
|
||||
volatile uint32_t I2S_CLOCK_CTRL;
|
||||
volatile uint32_t PDM_CLOCK_CTRL;
|
||||
volatile uint32_t PDM_FILTER_CTRL;
|
||||
volatile uint32_t IE;
|
||||
volatile uint32_t IP;
|
||||
}i2s_t;
|
||||
@@ -79,6 +80,10 @@ typedef struct {
|
||||
#define I2S_PDM_CLOCK_CTRL_MASK 0x3ff
|
||||
#define I2S_PDM_CLOCK_CTRL(V) ((V & I2S_PDM_CLOCK_CTRL_MASK) << I2S_PDM_CLOCK_CTRL_OFFS)
|
||||
|
||||
#define I2S_PDM_FILTER_CTRL_OFFS 0
|
||||
#define I2S_PDM_FILTER_CTRL_MASK 0x3ff
|
||||
#define I2S_PDM_FILTER_CTRL(V) ((V & I2S_PDM_FILTER_CTRL_MASK) << I2S_PDM_FILTER_CTRL_OFFS)
|
||||
|
||||
#define I2S_IE_EN_LEFT_SAMPLE_AVAIL_OFFS 0
|
||||
#define I2S_IE_EN_LEFT_SAMPLE_AVAIL_MASK 0x1
|
||||
#define I2S_IE_EN_LEFT_SAMPLE_AVAIL(V) ((V & I2S_IE_EN_LEFT_SAMPLE_AVAIL_MASK) << I2S_IE_EN_LEFT_SAMPLE_AVAIL_OFFS)
|
||||
@@ -194,6 +199,20 @@ inline void set_i2s_pdm_clock_ctrl_divider(volatile i2s_t* reg, uint16_t value){
|
||||
reg->PDM_CLOCK_CTRL = (reg->PDM_CLOCK_CTRL & ~(0x3ffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//I2S_PDM_FILTER_CTRL
|
||||
inline uint32_t get_i2s_pdm_filter_ctrl(volatile i2s_t* reg){
|
||||
return reg->PDM_FILTER_CTRL;
|
||||
}
|
||||
inline void set_i2s_pdm_filter_ctrl(volatile i2s_t* reg, uint32_t value){
|
||||
reg->PDM_FILTER_CTRL = value;
|
||||
}
|
||||
inline uint32_t get_i2s_pdm_filter_ctrl_decimationFactor(volatile i2s_t* reg){
|
||||
return (reg->PDM_FILTER_CTRL >> 0) & 0x3ff;
|
||||
}
|
||||
inline void set_i2s_pdm_filter_ctrl_decimationFactor(volatile i2s_t* reg, uint16_t value){
|
||||
reg->PDM_FILTER_CTRL = (reg->PDM_FILTER_CTRL & ~(0x3ffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//I2S_IE
|
||||
inline uint32_t get_i2s_ie(volatile i2s_t* reg){
|
||||
return reg->IE;
|
||||
|
Reference in New Issue
Block a user