29 lines
613 B
C
29 lines
613 B
C
#ifndef PIXART_PAH8001EI_H
|
|
#define PIXART_PAH8001EI_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef enum {
|
|
PAH_RET_OK,
|
|
PAH_RET_FAIL,
|
|
} pah_ret_t;
|
|
|
|
typedef pah_ret_t (*pah_ops_init_t)(void *pdev);
|
|
typedef pah_ret_t (*pah_ops_read_t)(void *pdev, uint8_t reg, uint8_t *value, uint16_t len);
|
|
typedef pah_ret_t (*pah_ops_write_t)(void *pdev, uint8_t reg, uint8_t *value, uint16_t len);
|
|
|
|
typedef struct {
|
|
pah_ops_init_t init;
|
|
pah_ops_read_t read;
|
|
pah_ops_write_t write;
|
|
} pah_ops_t;
|
|
|
|
typedef struct {
|
|
pah_ops_t ops;
|
|
void *pdev;
|
|
} pah_t;
|
|
|
|
pah_ret_t pah8001_init(pah_t *pah);
|
|
|
|
#endif |