22 lines
695 B
C
22 lines
695 B
C
|
|
|
|
|
|
#ifndef _HAMSHIELD_COMMS_H_
|
|
#define _HAMSHIELD_COMMS_H_
|
|
|
|
#include "Arduino.h"
|
|
//#include "I2Cdev.h"
|
|
|
|
#define nSEN A1
|
|
#define CLK A5
|
|
#define DAT A4
|
|
|
|
int8_t HSreadBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data);
|
|
int8_t HSreadBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data);
|
|
int8_t HSreadWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data);
|
|
|
|
bool HSwriteBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data);
|
|
bool HSwriteBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data);
|
|
bool HSwriteWord(uint8_t devAddr, uint8_t regAddr, uint16_t data);
|
|
|
|
#endif /* _HAMSHIELD_COMMS_H_ */ |