mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
const for i2c
This commit is contained in:
parent
6eae62edec
commit
8af8723528
2 changed files with 6 additions and 6 deletions
|
@ -407,7 +407,7 @@ bool I2C_WriteByte(uint8_t data, uint8_t device_cmd, uint8_t device_address) {
|
||||||
|
|
||||||
//Sends array of data (Array, length, command to be written , SlaveDevice address ).
|
//Sends array of data (Array, length, command to be written , SlaveDevice address ).
|
||||||
// len = uint16 because we need to write up to 256 bytes
|
// len = uint16 because we need to write up to 256 bytes
|
||||||
bool I2C_BufferWrite(uint8_t *data, uint16_t len, uint8_t device_cmd, uint8_t device_address) {
|
bool I2C_BufferWrite(const uint8_t *data, uint16_t len, uint8_t device_cmd, uint8_t device_address) {
|
||||||
bool bBreak = true;
|
bool bBreak = true;
|
||||||
do {
|
do {
|
||||||
if (!I2C_Start())
|
if (!I2C_Start())
|
||||||
|
@ -602,7 +602,7 @@ int16_t I2C_ReadFW(uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t
|
||||||
return readcount;
|
return readcount;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool I2C_WriteFW(uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t device_address) {
|
bool I2C_WriteFW(const uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t device_address) {
|
||||||
//START, 0xB0, 0x00, 0x00, xx, yy, zz, ......, STOP
|
//START, 0xB0, 0x00, 0x00, xx, yy, zz, ......, STOP
|
||||||
bool bBreak = true;
|
bool bBreak = true;
|
||||||
|
|
||||||
|
@ -772,7 +772,7 @@ void SmartCardAtr(void) {
|
||||||
// StopTicks();
|
// StopTicks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SmartCardRaw(smart_card_raw_t *p) {
|
void SmartCardRaw(const smart_card_raw_t *p) {
|
||||||
LED_D_ON();
|
LED_D_ON();
|
||||||
|
|
||||||
uint16_t len = 0;
|
uint16_t len = 0;
|
||||||
|
|
|
@ -41,12 +41,12 @@ void I2C_Reset_EnterBootloader(void);
|
||||||
bool I2C_WriteCmd(uint8_t device_cmd, uint8_t device_address);
|
bool I2C_WriteCmd(uint8_t device_cmd, uint8_t device_address);
|
||||||
|
|
||||||
bool I2C_WriteByte(uint8_t data, uint8_t device_cmd, uint8_t device_address);
|
bool I2C_WriteByte(uint8_t data, uint8_t device_cmd, uint8_t device_address);
|
||||||
bool I2C_BufferWrite(uint8_t *data, uint16_t len, uint8_t device_cmd, uint8_t device_address);
|
bool I2C_BufferWrite(const uint8_t *data, uint16_t len, uint8_t device_cmd, uint8_t device_address);
|
||||||
int16_t I2C_BufferRead(uint8_t *data, uint16_t len, uint8_t device_cmd, uint8_t device_address);
|
int16_t I2C_BufferRead(uint8_t *data, uint16_t len, uint8_t device_cmd, uint8_t device_address);
|
||||||
|
|
||||||
// for firmware
|
// for firmware
|
||||||
int16_t I2C_ReadFW(uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t device_address);
|
int16_t I2C_ReadFW(uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t device_address);
|
||||||
bool I2C_WriteFW(uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t device_address);
|
bool I2C_WriteFW(const uint8_t *data, uint8_t len, uint8_t msb, uint8_t lsb, uint8_t device_address);
|
||||||
|
|
||||||
bool sc_rx_bytes(uint8_t *dest, uint16_t *destlen);
|
bool sc_rx_bytes(uint8_t *dest, uint16_t *destlen);
|
||||||
//
|
//
|
||||||
|
@ -54,7 +54,7 @@ bool GetATR(smart_card_atr_t *card_ptr, bool verbose);
|
||||||
|
|
||||||
// generice functions
|
// generice functions
|
||||||
void SmartCardAtr(void);
|
void SmartCardAtr(void);
|
||||||
void SmartCardRaw(smart_card_raw_t *p);
|
void SmartCardRaw(const smart_card_raw_t *p);
|
||||||
void SmartCardUpgrade(uint64_t arg0);
|
void SmartCardUpgrade(uint64_t arg0);
|
||||||
void SmartCardSetBaud(uint64_t arg0);
|
void SmartCardSetBaud(uint64_t arg0);
|
||||||
void SmartCardSetClock(uint64_t arg0);
|
void SmartCardSetClock(uint64_t arg0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue