mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 05:13:22 -07:00
RDV40 compatibility fixes (#678)
* detect and use RDV40 higher voltage ADC channel for hw tune, hf tune, hw detectreader * fix mode switching in hw detectreader * detect Smartcard Slot in hw version * i2c changes from https://github.com/RfidResearchGroup/proxmark3 * some formatting in proxmark3.h
This commit is contained in:
parent
2758d83652
commit
050aa18b13
8 changed files with 352 additions and 244 deletions
33
armsrc/i2c.h
33
armsrc/i2c.h
|
@ -11,12 +11,8 @@
|
|||
#ifndef __I2C_H
|
||||
#define __I2C_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "proxmark3.h"
|
||||
#include "apps.h"
|
||||
#include "util.h"
|
||||
#include "BigBuf.h"
|
||||
#include "smartcard.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define I2C_DEVICE_ADDRESS_BOOT 0xB0
|
||||
#define I2C_DEVICE_ADDRESS_MAIN 0xC0
|
||||
|
@ -28,31 +24,14 @@
|
|||
#define I2C_DEVICE_CMD_SIM_CLC 0x05
|
||||
#define I2C_DEVICE_CMD_GETVERSION 0x06
|
||||
|
||||
bool I2C_is_available(void);
|
||||
|
||||
void I2C_init(void);
|
||||
void I2C_Reset(void);
|
||||
void I2C_SetResetStatus(uint8_t LineRST, uint8_t LineSCK, uint8_t LineSDA);
|
||||
|
||||
void I2C_Reset_EnterMainProgram(void);
|
||||
void I2C_Reset_EnterBootloader(void);
|
||||
|
||||
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_BufferWrite(uint8_t *data, uint8_t len, uint8_t device_cmd, uint8_t device_address);
|
||||
uint8_t I2C_BufferRead(uint8_t *data, uint8_t len, uint8_t device_cmd, uint8_t device_address);
|
||||
|
||||
// for firmware
|
||||
uint8_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 GetATR(smart_card_atr_t *card_ptr);
|
||||
|
||||
// generic functions
|
||||
#ifdef WITH_SMARTCARD
|
||||
void SmartCardAtr(void);
|
||||
void SmartCardRaw(uint64_t arg0, uint64_t arg1, uint8_t *data);
|
||||
void SmartCardUpgrade(uint64_t arg0);
|
||||
//void SmartCardSetBaud(uint64_t arg0);
|
||||
void SmartCardSetClock(uint64_t arg0);
|
||||
void I2C_print_status(void);
|
||||
#endif
|
||||
|
||||
#endif // __I2C_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue