SemiDrive SSDK Appication Program Interface PTG3.0
Data Structures
sdrv-cam-baremetal-def.h File Reference
#include <assert.h>
#include <bits.h>
#include <board.h>
#include <debug.h>
#include <errno.h>
#include <lib/list.h>
#include <reg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <types.h>
#include "armv7-r/atomic.h"
#include "armv7-r/cache.h"
#include "armv7-r/irq.h"
#include "config.h"
#include "i2c_cfg.h"
#include "irq.h"
#include "irq_num.h"
#include "regs_base.h"
#include "sdrv_gpio.h"
#include "sdrv_i2c.h"
#include "udelay/udelay.h"

Go to the source code of this file.

Data Structures

struct  completion_t
 

Detailed Description

This file is licensed under a dual GPLv2 or X11 license.

Macro Definition Documentation

◆ cam_debug

#define cam_debug (   x...)    ssdk_printf(SSDK_DEBUG, x)

◆ cam_err

#define cam_err (   x...)    ssdk_printf(SSDK_ERR, x)

◆ cam_info

#define cam_info (   x...)    ssdk_printf(SSDK_NOTICE, x)

◆ CSI_COMPLETE_EVENT_FLAG

#define CSI_COMPLETE_EVENT_FLAG   1u

◆ csi_debug

#define csi_debug (   x...)    ssdk_printf(SSDK_DEBUG, x)

◆ csi_err

#define csi_err (   x...)    ssdk_printf(SSDK_ERR, x)

◆ csi_info

#define csi_info (   x...)    ssdk_printf(SSDK_NOTICE, x)

◆ csi_warn

#define csi_warn (   x...)    ssdk_printf(SSDK_WARNING, x)

◆ deser_crit

#define deser_crit (   x...)    ssdk_printf(SSDK_CRIT, x)

◆ deser_debug

#define deser_debug (   x...)    ssdk_printf(SSDK_DEBUG, x)

◆ deser_err

#define deser_err (   x...)    ssdk_printf(SSDK_ERR, x)

◆ deser_info

#define deser_info (   x...)    ssdk_printf(SSDK_NOTICE, x)

◆ free

#define free (   a)

◆ HAL_LOGD

#define HAL_LOGD (   x...)    ssdk_printf(SSDK_DEBUG, x)

◆ HAL_LOGE

#define HAL_LOGE (   x...)    ssdk_printf(SSDK_ERR, x)

◆ HAL_LOGI

#define HAL_LOGI (   x...)    ssdk_printf(SSDK_NOTICE, x)

◆ malloc

#define malloc (   a)    _DO_NOT_USE_MALLOC_IN_BAREMETAL_

◆ sensor_debug

#define sensor_debug (   x...)    ssdk_printf(SSDK_DEBUG, x)

◆ sensor_err

#define sensor_err (   x...)    ssdk_printf(SSDK_ERR, x)

◆ sensor_info

#define sensor_info (   x...)    ssdk_printf(SSDK_NOTICE, x)

◆ spin_lock_init

#define spin_lock_init (   a)    (*a = NULL)

◆ spin_lock_irqsave

#define spin_lock_irqsave (   spinlock,
  flags 
)
Value:
do { \
irq_state_t state = arch_irq_save(); \
flags = state; \
} while (0)

◆ spin_unlock_irqrestore

#define spin_unlock_irqrestore (   spinlock,
  flags 
)
Value:
do { \
irq_state_t state = (irq_state_t)flags; \
arch_irq_restore(state); \
} while (0)

Typedef Documentation

◆ dma_addr_t

typedef paddr_t dma_addr_t

◆ osEventFlagsId_t

typedef uint32_t osEventFlagsId_t

◆ osMutexId_t

typedef void* osMutexId_t

◆ reg_addr_t

typedef paddr_t reg_addr_t

◆ spinlock_t

typedef void* spinlock_t

Enumeration Type Documentation

◆ osStatus_t

enum osStatus_t
Enumerator
osOK 

Operation completed successfully.

osError 

Unspecified RTOS error: run-time error but no other error message fits.

osErrorTimeout 

Operation not completed within the timeout period.

osErrorResource 

Resource not available.

osErrorParameter 

Parameter error.

osErrorNoMemory 

System is out of memory: it was impossible to allocate or reserve memory for the operation.

osErrorISR 

Not allowed in ISR context: the function cannot be called from interrupt service routines.

osStatusReserved 

Prevents enum down-size compiler optimization.

osOK 

Operation completed successfully.

osError 

Unspecified RTOS error: run-time error but no other error message fits.

osErrorTimeout 

Operation not completed within the timeout period.

osErrorResource 

Resource not available.

osErrorParameter 

Parameter error.

osErrorNoMemory 

System is out of memory: it was impossible to allocate or reserve memory for the operation.

osErrorISR 

Not allowed in ISR context: the function cannot be called from interrupt service routines.

osStatusReserved 

Prevents enum down-size compiler optimization.

Function Documentation

◆ completion_destroy()

static void completion_destroy ( completion_t com)
inlinestatic

◆ completion_done()

static void completion_done ( completion_t com)
inlinestatic

◆ completion_init()

static void completion_init ( completion_t com)
inlinestatic

◆ gpio_set()

static void gpio_set ( void *  dev,
unsigned int  pin,
bool  level 
)
inlinestatic

◆ i2c_read()

static int i2c_read ( void *  adap,
uint8_t  addr,
uint8_t *  buf,
int  count 
)
inlinestatic

◆ i2c_write()

static int i2c_write ( void *  adap,
uint8_t  addr,
uint8_t *  buf,
int  count 
)
inlinestatic

◆ i2c_write_read()

static int i2c_write_read ( void *  adap,
uint8_t  addr,
uint8_t *  reg,
int  regc,
uint8_t *  buf,
int  bufc 
)
inlinestatic

◆ mdelay()

static void mdelay ( uint32_t  ms)
inlinestatic

◆ osMutexAcquire()

static void osMutexAcquire ( void *  p,
int  t 
)
inlinestatic

◆ osMutexDelete()

static void osMutexDelete ( void *  p)
inlinestatic

◆ osMutexNew()

static osMutexId_t osMutexNew ( void *  p)
inlinestatic

◆ osMutexRelease()

static void osMutexRelease ( void *  p)
inlinestatic

◆ reg_read()

static uint32_t reg_read ( reg_addr_t  base,
uint32_t  addr 
)
inlinestatic

◆ reg_write()

static void reg_write ( reg_addr_t  base,
uint32_t  addr,
uint32_t  val 
)
inlinestatic

◆ usleep_range()

static void usleep_range ( uint32_t  min,
uint32_t  max 
)
inlinestatic

◆ wait_completion_timeout()

static int wait_completion_timeout ( completion_t com,
uint32_t  timeout 
)
inlinestatic

◆ wait_idle_and_set_busy()

static void wait_idle_and_set_busy ( void *  ctrl)
inlinestatic