disable clock settings for NFC passive for now

This commit is contained in:
Conor Patrick 2019-03-02 01:30:09 -05:00
parent 9b356076c5
commit 83641b3789
2 changed files with 17 additions and 16 deletions

View File

@ -110,28 +110,28 @@ void device_reboot()
void device_init() void device_init()
{ {
hw_init(LOW_FREQUENCY);
isLowFreq = 1;
haveNFC = nfc_init();
if (haveNFC)
{
printf1(TAG_NFC, "Have NFC\r\n");
}
else
{
printf1(TAG_NFC, "Have NO NFC\r\n");
hw_init(HIGH_FREQUENCY); hw_init(HIGH_FREQUENCY);
isLowFreq = 0; isLowFreq = 0;
}
// haveNFC = nfc_init();
// if (haveNFC)
// {
// printf1(TAG_NFC, "Have NFC\r\n");
// }
// else
// {
// printf1(TAG_NFC, "Have NO NFC\r\n");
// hw_init(HIGH_FREQUENCY);
//
// isLowFreq = 0;
// }
usbhid_init(); usbhid_init();
ctaphid_init(); ctaphid_init();
ctap_init( !haveNFC ); ctap_init( 1 );
#if BOOT_TO_DFU #if BOOT_TO_DFU
flash_option_bytes_init(1); flash_option_bytes_init(1);

View File

@ -221,7 +221,8 @@ void SystemInit(void)
/* Disable all interrupts */ /* Disable all interrupts */
RCC->CIER = 0x00000000U; RCC->CIER = 0x00000000U;
device_set_clock_rate(DEVICE_LOW_POWER_IDLE); // TODO this is causing boot issues for old bootloader
// device_set_clock_rate(DEVICE_LOW_POWER_IDLE);
} }