IMX500 MCU SDK
API reference for the Arducam IMX500 MCU SDK
Loading...
Searching...
No Matches
ai_driver.h File Reference

Host-side driver registration hooks used by the IMX500 MCU SDK. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  i2c_driver
 Platform I2C and timing hooks used by the SDK runtime. More...
struct  spi_driver
 Platform SPI hooks used by the SDK runtime. More...

Typedefs

typedef int(* i2c_read_fn) (uint16_t addr, uint32_t *val, uint32_t size)
 I2C read callback supplied by the platform.
typedef int(* i2c_write_block_fn) (uint16_t addr, const uint8_t *data, uint32_t len)
 Optional raw I2C block-write callback supplied by the platform.
typedef int(* i2c_write_fn) (uint16_t addr, uint32_t val, uint32_t size)
 I2C write callback supplied by the platform.
typedef void(* imx500_printf_fn) (const char *msg)
 Optional log sink used instead of the SDK printf fallback.
typedef void(* sleep_ms_fn) (uint32_t ms)
 Millisecond delay callback supplied by the platform.
typedef void(* sleep_us_fn) (uint64_t us)
 Microsecond delay callback supplied by the platform.
typedef int(* spi_read_fn) (uint8_t *data, uint32_t len)
 SPI receive callback supplied by the platform.
typedef int(* spi_write_fn) (uint8_t *data, uint32_t len)
 SPI transmit callback supplied by the platform.

Functions

void register_i2c_driver (i2c_driver driver)
 Register the I2C and delay implementation used by the SDK.
void register_printf (imx500_printf_fn fn)
 Register an optional logging callback for SDK messages.
void register_spi_driver (spi_driver driver)
 Register the SPI implementation used by the SDK.

Detailed Description

Host-side driver registration hooks used by the IMX500 MCU SDK.

Definition in file ai_driver.h.

Typedef Documentation

◆ i2c_read_fn

typedef int(* i2c_read_fn) (uint16_t addr, uint32_t *val, uint32_t size)

I2C read callback supplied by the platform.

Definition at line 42 of file ai_driver.h.

◆ i2c_write_block_fn

typedef int(* i2c_write_block_fn) (uint16_t addr, const uint8_t *data, uint32_t len)

Optional raw I2C block-write callback supplied by the platform.

Definition at line 45 of file ai_driver.h.

◆ i2c_write_fn

typedef int(* i2c_write_fn) (uint16_t addr, uint32_t val, uint32_t size)

I2C write callback supplied by the platform.

Definition at line 39 of file ai_driver.h.

◆ imx500_printf_fn

typedef void(* imx500_printf_fn) (const char *msg)

Optional log sink used instead of the SDK printf fallback.

Definition at line 54 of file ai_driver.h.

◆ sleep_ms_fn

typedef void(* sleep_ms_fn) (uint32_t ms)

Millisecond delay callback supplied by the platform.

Definition at line 48 of file ai_driver.h.

◆ sleep_us_fn

typedef void(* sleep_us_fn) (uint64_t us)

Microsecond delay callback supplied by the platform.

Definition at line 51 of file ai_driver.h.

◆ spi_read_fn

typedef int(* spi_read_fn) (uint8_t *data, uint32_t len)

SPI receive callback supplied by the platform.

Definition at line 19 of file ai_driver.h.

◆ spi_write_fn

typedef int(* spi_write_fn) (uint8_t *data, uint32_t len)

SPI transmit callback supplied by the platform.

Definition at line 16 of file ai_driver.h.

Function Documentation

◆ register_i2c_driver()

void register_i2c_driver ( i2c_driver driver)

Register the I2C and delay implementation used by the SDK.

◆ register_printf()

void register_printf ( imx500_printf_fn fn)

Register an optional logging callback for SDK messages.

◆ register_spi_driver()

void register_spi_driver ( spi_driver driver)

Register the SPI implementation used by the SDK.