class pah8011 for mbed

pah8011/pah_comm.h

Committer:
bell_huang
Date:
2017-10-26
Revision:
0:242cf8f28bf2
Child:
6:d196b612b14a

File content as of revision 0:242cf8f28bf2:

/*==============================================================================
* Edit History
* 
* This section contains comments describing changes made to the module. Notice
* that changes are listed in reverse chronological order. Please use ISO format
* for dates.
* 
* when       who       what, where, why
* ---------- ---       -----------------------------------------------------------
* 2016-10-18 bh        - Add enum: pah_comm_bus_e.
*                      - Add function: pah_comm_get_bus_type().
* 2016-04-12 bh        - Add license information and revision information
* 2016-04-07 bh        - Initial revision.
==============================================================================*/

#ifndef __pah_comm_h__
#define __pah_comm_h__


#include "pah_platform_types.h"


typedef enum {

    pah_comm_bus_i2c,
    pah_comm_bus_spi,

} pah_comm_bus_e;


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);


#endif  // header guard