makes all inline functions static to make building w/o optimization possible
This commit is contained in:
@@ -49,78 +49,78 @@ typedef struct {
|
||||
#define CAMERA_IP_FRAME_FINISHED_IRQ_PEND(V) ((V & CAMERA_IP_FRAME_FINISHED_IRQ_PEND_MASK) << CAMERA_IP_FRAME_FINISHED_IRQ_PEND_OFFS)
|
||||
|
||||
//CAMERA_PIXEL
|
||||
inline uint32_t get_camera_pixel(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_pixel(volatile camera_t* reg){
|
||||
return reg->PIXEL;
|
||||
}
|
||||
inline void set_camera_pixel(volatile camera_t* reg, uint32_t value){
|
||||
static inline void set_camera_pixel(volatile camera_t* reg, uint32_t value){
|
||||
reg->PIXEL = value;
|
||||
}
|
||||
inline uint32_t get_camera_pixel_data(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_pixel_data(volatile camera_t* reg){
|
||||
return (reg->PIXEL >> 0) & 0x7ff;
|
||||
}
|
||||
inline void set_camera_pixel_data(volatile camera_t* reg, uint16_t value){
|
||||
static inline void set_camera_pixel_data(volatile camera_t* reg, uint16_t value){
|
||||
reg->PIXEL = (reg->PIXEL & ~(0x7ffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//CAMERA_STATUS
|
||||
inline uint32_t get_camera_status(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_status(volatile camera_t* reg){
|
||||
return reg->STATUS;
|
||||
}
|
||||
inline uint32_t get_camera_status_pixel_avail(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_status_pixel_avail(volatile camera_t* reg){
|
||||
return (reg->STATUS >> 0) & 0x1;
|
||||
}
|
||||
|
||||
//CAMERA_CAMERA_CLOCK_CTRL
|
||||
inline uint32_t get_camera_camera_clock_ctrl(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_camera_clock_ctrl(volatile camera_t* reg){
|
||||
return reg->CAMERA_CLOCK_CTRL;
|
||||
}
|
||||
inline void set_camera_camera_clock_ctrl(volatile camera_t* reg, uint32_t value){
|
||||
static inline void set_camera_camera_clock_ctrl(volatile camera_t* reg, uint32_t value){
|
||||
reg->CAMERA_CLOCK_CTRL = value;
|
||||
}
|
||||
inline uint32_t get_camera_camera_clock_ctrl_divider(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_camera_clock_ctrl_divider(volatile camera_t* reg){
|
||||
return (reg->CAMERA_CLOCK_CTRL >> 0) & 0xfffff;
|
||||
}
|
||||
inline void set_camera_camera_clock_ctrl_divider(volatile camera_t* reg, uint32_t value){
|
||||
static inline void set_camera_camera_clock_ctrl_divider(volatile camera_t* reg, uint32_t value){
|
||||
reg->CAMERA_CLOCK_CTRL = (reg->CAMERA_CLOCK_CTRL & ~(0xfffffU << 0)) | (value << 0);
|
||||
}
|
||||
|
||||
//CAMERA_IE
|
||||
inline uint32_t get_camera_ie(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_ie(volatile camera_t* reg){
|
||||
return reg->IE;
|
||||
}
|
||||
inline void set_camera_ie(volatile camera_t* reg, uint32_t value){
|
||||
static inline void set_camera_ie(volatile camera_t* reg, uint32_t value){
|
||||
reg->IE = value;
|
||||
}
|
||||
inline uint32_t get_camera_ie_en_pixel_avail(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_ie_en_pixel_avail(volatile camera_t* reg){
|
||||
return (reg->IE >> 0) & 0x1;
|
||||
}
|
||||
inline void set_camera_ie_en_pixel_avail(volatile camera_t* reg, uint8_t value){
|
||||
static inline void set_camera_ie_en_pixel_avail(volatile camera_t* reg, uint8_t value){
|
||||
reg->IE = (reg->IE & ~(0x1U << 0)) | (value << 0);
|
||||
}
|
||||
inline uint32_t get_camera_ie_en_frame_finished(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_ie_en_frame_finished(volatile camera_t* reg){
|
||||
return (reg->IE >> 1) & 0x1;
|
||||
}
|
||||
inline void set_camera_ie_en_frame_finished(volatile camera_t* reg, uint8_t value){
|
||||
static inline void set_camera_ie_en_frame_finished(volatile camera_t* reg, uint8_t value){
|
||||
reg->IE = (reg->IE & ~(0x1U << 1)) | (value << 1);
|
||||
}
|
||||
|
||||
//CAMERA_IP
|
||||
inline uint32_t get_camera_ip(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_ip(volatile camera_t* reg){
|
||||
return reg->IP;
|
||||
}
|
||||
inline void set_camera_ip(volatile camera_t* reg, uint32_t value){
|
||||
static inline void set_camera_ip(volatile camera_t* reg, uint32_t value){
|
||||
reg->IP = value;
|
||||
}
|
||||
inline uint32_t get_camera_ip_pixel_avail_irq_pend(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_ip_pixel_avail_irq_pend(volatile camera_t* reg){
|
||||
return (reg->IP >> 0) & 0x1;
|
||||
}
|
||||
inline void set_camera_ip_pixel_avail_irq_pend(volatile camera_t* reg, uint8_t value){
|
||||
static inline void set_camera_ip_pixel_avail_irq_pend(volatile camera_t* reg, uint8_t value){
|
||||
reg->IP = (reg->IP & ~(0x1U << 0)) | (value << 0);
|
||||
}
|
||||
inline uint32_t get_camera_ip_frame_finished_irq_pend(volatile camera_t* reg){
|
||||
static inline uint32_t get_camera_ip_frame_finished_irq_pend(volatile camera_t* reg){
|
||||
return (reg->IP >> 1) & 0x1;
|
||||
}
|
||||
inline void set_camera_ip_frame_finished_irq_pend(volatile camera_t* reg, uint8_t value){
|
||||
static inline void set_camera_ip_frame_finished_irq_pend(volatile camera_t* reg, uint8_t value){
|
||||
reg->IP = (reg->IP & ~(0x1U << 1)) | (value << 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user