26 lines
641 B
C
26 lines
641 B
C
#ifndef EWL1501AA_H
|
|
#define EWL1501AA_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef enum {
|
|
EWL1501AA_OK,
|
|
EWL1501AA_FAIL,
|
|
} ewl1501aa_ret_t;
|
|
|
|
typedef struct {
|
|
ewl1501aa_ret_t (*reset_cb)(void *handle);
|
|
ewl1501aa_ret_t (*write_cmd_cb)(void *handle, uint8_t *cmd, uint8_t len);
|
|
ewl1501aa_ret_t (*write_data_cb)(void *handle, uint8_t *data, uint16_t len);
|
|
} ewl1501aa_cb_t;
|
|
|
|
typedef struct {
|
|
ewl1501aa_cb_t cb;
|
|
void *user_data;
|
|
} ewl1501aa_t;
|
|
|
|
ewl1501aa_ret_t ewl1501aa_init(ewl1501aa_t *ewl);
|
|
ewl1501aa_ret_t ewl1501aa_upload(ewl1501aa_t *ewl, uint8_t *data);
|
|
ewl1501aa_ret_t ewl1501aa_power(ewl1501aa_t *ewl, uint8_t on);
|
|
|
|
#endif |