class pah8011 for mbed

pah8011/pah_comm.h

Committer:
bell_huang
Date:
2019-01-23
Revision:
6:d196b612b14a
Parent:
0:242cf8f28bf2

File content as of revision 6:d196b612b14a:

#pragma once


#include "pah_platform_types.h"
#include "pah_drv_comm.h"


typedef enum {

    pah_comm_bus_i2c,
    pah_comm_bus_spi,

} pah_comm_bus_e;


void  pah_comm_set_drv_comm(const pah_drv_comm_s *drv_comm);

bool  pah_comm_write(uint8_t addr, uint8_t data);
bool  pah_comm_read(uint8_t addr, uint8_t *data);
bool  pah_comm_burst_read(uint8_t addr, uint8_t *data, uint16_t num);

pah_comm_bus_e     pah_comm_get_bus_type(void);