diff options
-rw-r--r-- | main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -452,7 +452,7 @@ int main() { RCC.enable(RCC.GPIOB); usb_disc.on(); - usb_disc.set_type(Pin::OpenDrain); + //usb_disc.set_type(Pin::OpenDrain); usb_disc.set_mode(Pin::Output); usb_dm.set_mode(Pin::AF); @@ -462,9 +462,6 @@ int main() { usb.init(); - Time::sleep(10); - usb_disc.off(); - RCC.enable(RCC.SPI1); nfc_irq_out.set_mode(Pin::Input); @@ -490,9 +487,13 @@ int main() { bool cmd_sent = false; uint32_t nfc_delay_until = 0; + Time::sleep(1000); + cr95hf.send_cmd(0x02, 2, (uint8_t*)"\x01\x05"); // Select ISO 15693 cr95hf.get_response(64, buf); + usb_disc.off(); + while(1) { if(Time::time() < nfc_delay_until) { // Just do nothing. |