Followthrough of the cleanup
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include "Pins.h"
|
#include "Pins.h"
|
||||||
#include "QC3.h"
|
#include "QC3.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
|
#include "fusb_user.h"
|
||||||
#include "fusbpd.h"
|
#include "fusbpd.h"
|
||||||
#include "int_n.h"
|
#include "int_n.h"
|
||||||
#include "policy_engine.h"
|
#include "policy_engine.h"
|
||||||
|
|||||||
@@ -5,21 +5,6 @@
|
|||||||
#include "Setup.h"
|
#include "Setup.h"
|
||||||
#include "fusb302b.h"
|
#include "fusb302b.h"
|
||||||
#include "fusb_user.h"
|
#include "fusb_user.h"
|
||||||
/*
|
|
||||||
* Read a single byte from the FUSB302B
|
|
||||||
*
|
|
||||||
* cfg: The FUSB302B to communicate with
|
|
||||||
* addr: The memory address from which to read
|
|
||||||
*
|
|
||||||
* Returns the value read from addr.
|
|
||||||
*/
|
|
||||||
uint8_t fusb_read_byte(uint8_t addr) {
|
|
||||||
uint8_t data[1];
|
|
||||||
if (!I2CBB::Mem_Read(FUSB302B_ADDR, addr, (uint8_t *)data, 1)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return data[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read multiple bytes from the FUSB302B
|
* Read multiple bytes from the FUSB302B
|
||||||
@@ -31,15 +16,6 @@ uint8_t fusb_read_byte(uint8_t addr) {
|
|||||||
*/
|
*/
|
||||||
bool fusb_read_buf(uint8_t addr, uint8_t size, uint8_t *buf) { return I2CBB::Mem_Read(FUSB302B_ADDR, addr, buf, size); }
|
bool fusb_read_buf(uint8_t addr, uint8_t size, uint8_t *buf) { return I2CBB::Mem_Read(FUSB302B_ADDR, addr, buf, size); }
|
||||||
|
|
||||||
/*
|
|
||||||
* Write a single byte to the FUSB302B
|
|
||||||
*
|
|
||||||
* cfg: The FUSB302B to communicate with
|
|
||||||
* addr: The memory address to which we will write
|
|
||||||
* byte: The value to write
|
|
||||||
*/
|
|
||||||
bool fusb_write_byte(uint8_t addr, uint8_t byte) { return I2CBB::Mem_Write(FUSB302B_ADDR, addr, (uint8_t *)&byte, 1); }
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write multiple bytes to the FUSB302B
|
* Write multiple bytes to the FUSB302B
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Pins.h"
|
#include "Pins.h"
|
||||||
#include "QC3.h"
|
#include "QC3.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
|
#include "fusb_user.h"
|
||||||
#include "fusbpd.h"
|
#include "fusbpd.h"
|
||||||
#include "int_n.h"
|
#include "int_n.h"
|
||||||
#include "policy_engine.h"
|
#include "policy_engine.h"
|
||||||
|
|||||||
@@ -5,21 +5,6 @@
|
|||||||
#include "Setup.h"
|
#include "Setup.h"
|
||||||
#include "fusb302b.h"
|
#include "fusb302b.h"
|
||||||
#include "fusb_user.h"
|
#include "fusb_user.h"
|
||||||
/*
|
|
||||||
* Read a single byte from the FUSB302B
|
|
||||||
*
|
|
||||||
* cfg: The FUSB302B to communicate with
|
|
||||||
* addr: The memory address from which to read
|
|
||||||
*
|
|
||||||
* Returns the value read from addr.
|
|
||||||
*/
|
|
||||||
uint8_t fusb_read_byte(uint8_t addr) {
|
|
||||||
uint8_t data[1];
|
|
||||||
if (!FRToSI2C::Mem_Read(FUSB302B_ADDR, addr, (uint8_t *)data, 1)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return data[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read multiple bytes from the FUSB302B
|
* Read multiple bytes from the FUSB302B
|
||||||
@@ -31,15 +16,6 @@ uint8_t fusb_read_byte(uint8_t addr) {
|
|||||||
*/
|
*/
|
||||||
bool fusb_read_buf(uint8_t addr, uint8_t size, uint8_t *buf) { return FRToSI2C::Mem_Read(FUSB302B_ADDR, addr, buf, size); }
|
bool fusb_read_buf(uint8_t addr, uint8_t size, uint8_t *buf) { return FRToSI2C::Mem_Read(FUSB302B_ADDR, addr, buf, size); }
|
||||||
|
|
||||||
/*
|
|
||||||
* Write a single byte to the FUSB302B
|
|
||||||
*
|
|
||||||
* cfg: The FUSB302B to communicate with
|
|
||||||
* addr: The memory address to which we will write
|
|
||||||
* byte: The value to write
|
|
||||||
*/
|
|
||||||
bool fusb_write_byte(uint8_t addr, uint8_t byte) { return FRToSI2C::Mem_Write(FUSB302B_ADDR, addr, (uint8_t *)&byte, 1); }
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write multiple bytes to the FUSB302B
|
* Write multiple bytes to the FUSB302B
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user