update moonlight register headers. Remove unused control register in

camera
This commit is contained in:
2024-09-10 15:46:32 +02:00
parent f632436fda
commit b36a42b386
3 changed files with 36 additions and 59 deletions

View File

@@ -3,8 +3,8 @@
*
* SPDX-License-Identifier: Apache-2.0
*
* Generated at 2024-08-02 08:46:07 UTC
* by peakrdl_mnrs version 1.2.7
* Generated at 2024-09-10 14:29:50 UTC
* by peakrdl_mnrs version 1.2.9
*/
#ifndef _BSP_I2S_H
@@ -43,11 +43,15 @@ typedef struct {
#define I2S_CONTROL_DISABLE_RIGHT_MASK 0x1
#define I2S_CONTROL_DISABLE_RIGHT(V) ((V & I2S_CONTROL_DISABLE_RIGHT_MASK) << I2S_CONTROL_DISABLE_RIGHT_OFFS)
#define I2S_CONTROL_ACTIVE_CLOCK_OFFS 4
#define I2S_CONTROL_ACTIVE_CLOCK_MASK 0x1
#define I2S_CONTROL_ACTIVE_CLOCK(V) ((V & I2S_CONTROL_ACTIVE_CLOCK_MASK) << I2S_CONTROL_ACTIVE_CLOCK_OFFS)
#define I2S_CONTROL_IS_MASTER_OFFS 4
#define I2S_CONTROL_IS_MASTER_MASK 0x1
#define I2S_CONTROL_IS_MASTER(V) ((V & I2S_CONTROL_IS_MASTER_MASK) << I2S_CONTROL_IS_MASTER_OFFS)
#define I2S_CONTROL_PDM_SCALE_OFFS 5
#define I2S_CONTROL_SAMPLE_SIZE_OFFS 5
#define I2S_CONTROL_SAMPLE_SIZE_MASK 0x3
#define I2S_CONTROL_SAMPLE_SIZE(V) ((V & I2S_CONTROL_SAMPLE_SIZE_MASK) << I2S_CONTROL_SAMPLE_SIZE_OFFS)
#define I2S_CONTROL_PDM_SCALE_OFFS 7
#define I2S_CONTROL_PDM_SCALE_MASK 0x7
#define I2S_CONTROL_PDM_SCALE(V) ((V & I2S_CONTROL_PDM_SCALE_MASK) << I2S_CONTROL_PDM_SCALE_OFFS)
@@ -126,17 +130,23 @@ inline uint32_t get_i2s_control_disable_right(volatile i2s_t* reg){
inline void set_i2s_control_disable_right(volatile i2s_t* reg, uint8_t value){
reg->CONTROL = (reg->CONTROL & ~(0x1U << 3)) | (value << 3);
}
inline uint32_t get_i2s_control_active_clock(volatile i2s_t* reg){
inline uint32_t get_i2s_control_is_master(volatile i2s_t* reg){
return (reg->CONTROL >> 4) & 0x1;
}
inline void set_i2s_control_active_clock(volatile i2s_t* reg, uint8_t value){
inline void set_i2s_control_is_master(volatile i2s_t* reg, uint8_t value){
reg->CONTROL = (reg->CONTROL & ~(0x1U << 4)) | (value << 4);
}
inline uint32_t get_i2s_control_sample_size(volatile i2s_t* reg){
return (reg->CONTROL >> 5) & 0x3;
}
inline void set_i2s_control_sample_size(volatile i2s_t* reg, uint8_t value){
reg->CONTROL = (reg->CONTROL & ~(0x3U << 5)) | (value << 5);
}
inline uint32_t get_i2s_control_pdm_scale(volatile i2s_t* reg){
return (reg->CONTROL >> 5) & 0x7;
return (reg->CONTROL >> 7) & 0x7;
}
inline void set_i2s_control_pdm_scale(volatile i2s_t* reg, uint8_t value){
reg->CONTROL = (reg->CONTROL & ~(0x7U << 5)) | (value << 5);
reg->CONTROL = (reg->CONTROL & ~(0x7U << 7)) | (value << 7);
}
//I2S_STATUS
@@ -215,4 +225,4 @@ inline uint32_t get_i2s_ip_right_sample_avail(volatile i2s_t* reg){
return (reg->IP >> 1) & 0x1;
}
#endif /* _BSP_I2S_H */
#endif /* _BSP_I2S_H */