chg: preparing for iso7816 module statuses

This commit is contained in:
iceman1001 2018-04-03 11:45:20 +02:00
commit 3f5aab8f05
4 changed files with 17 additions and 7 deletions

View file

@ -364,6 +364,7 @@ void SendStatus(void) {
BigBuf_print_status();
Fpga_print_status();
Flashmem_print_status();
//Iso7816_print_status();
printConfig(); //LF Sampling config
printUSBSpeed();
Dbprintf("Various");

View file

@ -782,7 +782,7 @@ bool prepare_tag_modulation(tag_response_info_t* response_info, size_t max_buffe
if (ToSendMax > max_buffer_size) {
Dbprintf("Out of memory, when modulating bits for tag answer:");
Dbhexdump(response_info->response_n,response_info->response,false);
return false;
return false;
}
// Copy the byte array, used for this modulation to the buffer position
@ -3045,6 +3045,7 @@ void Mifare1ksim(uint8_t flags, uint8_t exitAfterNReads, uint8_t arg2, uint8_t *
// find reader field
if (cardSTATE == MFEMUL_NOFIELD) {
vHf = (MAX_ADC_HF_VOLTAGE * AvgAdc(ADC_CHAN_HF)) >> 10;
if (vHf > MF_MINFIELDV) {
cardSTATE_TO_IDLE();

View file

@ -121,7 +121,6 @@ bool ISO7816_init(void) {
StartTicks();
// StopTicks();
// return false;
@ -135,3 +134,15 @@ void ISO7816_test(void) {
ISO7816_stop();
}
void Iso7816_print_status(void) {
DbpString("Contact module (iso7816)");
if (!ISO7816_init()) {
DbpString(" init....................FAIL");
return;
}
DbpString(" init....................OK");
ISO7816_stop();
}

View file

@ -5,10 +5,7 @@
#include "apps.h"
#include "ticks.h"
// Used Command
#define ID 0x90
#define SPI_CLK 75000000 //Hex equivalent of 75MHz
#define ISO_CLK 75000000 //Hex equivalent of 75MHz
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
extern void Dbprintf(const char *fmt, ...);
@ -19,5 +16,5 @@ bool ISO7816_waitidle(void);
uint16_t ISO7816_sendbyte(uint32_t data);
bool ISO7816_init();
void ISO7816_test(void);
void Iso7816_print_status(void);
#endif