update moonlight register headers. Remove unused control register in
camera
This commit is contained in:
@@ -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_CAMERA_H
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
typedef struct {
|
||||
volatile uint32_t PIXEL;
|
||||
volatile uint32_t CONTROL;
|
||||
volatile uint32_t STATUS;
|
||||
volatile uint32_t CAMERA_CLOCK_CTRL;
|
||||
volatile uint32_t IE;
|
||||
@@ -25,21 +24,9 @@ typedef struct {
|
||||
#define CAMERA_PIXEL_MASK 0x7ff
|
||||
#define CAMERA_PIXEL(V) ((V & CAMERA_PIXEL_MASK) << CAMERA_PIXEL_OFFS)
|
||||
|
||||
#define CAMERA_CONTROL_OFFS 0
|
||||
#define CAMERA_CONTROL_MASK 0x1
|
||||
#define CAMERA_CONTROL(V) ((V & CAMERA_CONTROL_MASK) << CAMERA_CONTROL_OFFS)
|
||||
|
||||
#define CAMERA_STATUS_ENABLED_OFFS 0
|
||||
#define CAMERA_STATUS_ENABLED_MASK 0x1
|
||||
#define CAMERA_STATUS_ENABLED(V) ((V & CAMERA_STATUS_ENABLED_MASK) << CAMERA_STATUS_ENABLED_OFFS)
|
||||
|
||||
#define CAMERA_STATUS_ACTIVE_OFFS 1
|
||||
#define CAMERA_STATUS_ACTIVE_MASK 0x1
|
||||
#define CAMERA_STATUS_ACTIVE(V) ((V & CAMERA_STATUS_ACTIVE_MASK) << CAMERA_STATUS_ACTIVE_OFFS)
|
||||
|
||||
#define CAMERA_STATUS_PIXEL_AVAIL_OFFS 2
|
||||
#define CAMERA_STATUS_PIXEL_AVAIL_MASK 0x1
|
||||
#define CAMERA_STATUS_PIXEL_AVAIL(V) ((V & CAMERA_STATUS_PIXEL_AVAIL_MASK) << CAMERA_STATUS_PIXEL_AVAIL_OFFS)
|
||||
#define CAMERA_STATUS_OFFS 0
|
||||
#define CAMERA_STATUS_MASK 0x1
|
||||
#define CAMERA_STATUS(V) ((V & CAMERA_STATUS_MASK) << CAMERA_STATUS_OFFS)
|
||||
|
||||
#define CAMERA_CAMERA_CLOCK_CTRL_OFFS 0
|
||||
#define CAMERA_CAMERA_CLOCK_CTRL_MASK 0xfffff
|
||||
@@ -75,32 +62,12 @@ inline void set_camera_pixel_data(volatile camera_t* reg, uint16_t value){
|
||||
reg->PIXEL = (reg->PIXEL & ~(0x7ffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//CAMERA_CONTROL
|
||||
inline uint32_t get_camera_control(volatile camera_t* reg){
|
||||
return reg->CONTROL;
|
||||
}
|
||||
inline void set_camera_control(volatile camera_t* reg, uint32_t value){
|
||||
reg->CONTROL = value;
|
||||
}
|
||||
inline uint32_t get_camera_control_active_clock(volatile camera_t* reg){
|
||||
return (reg->CONTROL >> 0) & 0x1;
|
||||
}
|
||||
inline void set_camera_control_active_clock(volatile camera_t* reg, uint8_t value){
|
||||
reg->CONTROL = (reg->CONTROL & ~(0x1U << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//CAMERA_STATUS
|
||||
inline uint32_t get_camera_status(volatile camera_t* reg){
|
||||
return reg->STATUS;
|
||||
}
|
||||
inline uint32_t get_camera_status_enabled(volatile camera_t* reg){
|
||||
return (reg->STATUS >> 0) & 0x1;
|
||||
}
|
||||
inline uint32_t get_camera_status_active(volatile camera_t* reg){
|
||||
return (reg->STATUS >> 1) & 0x1;
|
||||
}
|
||||
inline uint32_t get_camera_status_pixel_avail(volatile camera_t* reg){
|
||||
return (reg->STATUS >> 2) & 0x1;
|
||||
return (reg->STATUS >> 0) & 0x1;
|
||||
}
|
||||
|
||||
//CAMERA_CAMERA_CLOCK_CTRL
|
||||
@@ -157,4 +124,4 @@ inline void set_camera_ip_frame_finished_irq_pend(volatile camera_t* reg, uint8_
|
||||
reg->IP = (reg->IP & ~(0x1U << 1)) | (value << 1);
|
||||
}
|
||||
|
||||
#endif /* _BSP_CAMERA_H */
|
||||
#endif /* _BSP_CAMERA_H */
|
Reference in New Issue
Block a user