|
|
@@ -68,9 +68,9 @@ void play_halfbit(bool value, MagSetting* setting) {
|
|
|
//(value) ? furi_hal_nfc_ll_txrx_on() : furi_hal_nfc_ll_txrx_off();
|
|
|
|
|
|
if(last_value == 2 || value != (bool)last_value) {
|
|
|
- furi_hal_nfc_ll_txrx_on();
|
|
|
+ //furi_hal_nfc_ll_txrx_on();
|
|
|
//furi_delay_us(64);
|
|
|
- furi_hal_nfc_ll_txrx_off();
|
|
|
+ //furi_hal_nfc_ll_txrx_off();
|
|
|
}
|
|
|
break;
|
|
|
case MagTxCC1101_434:
|
|
|
@@ -126,8 +126,6 @@ void play_track(uint8_t* bits_manchester, uint16_t n_bits, MagSetting* setting,
|
|
|
void tx_init_rfid() {
|
|
|
// initialize RFID system for TX
|
|
|
|
|
|
- // OTG needed for RFID? Or just legacy from GPIO?
|
|
|
- // furi_hal_power_enable_otg();
|
|
|
furi_hal_ibutton_pin_configure();
|
|
|
|
|
|
// furi_hal_ibutton_start_drive();
|
|
|
@@ -155,7 +153,6 @@ void tx_deinit_rfid() {
|
|
|
furi_hal_gpio_write(RFID_PIN_OUT, 0);
|
|
|
|
|
|
furi_hal_rfid_pins_reset();
|
|
|
- furi_hal_power_disable_otg();
|
|
|
}
|
|
|
|
|
|
void tx_init_rf(int hz) {
|
|
|
@@ -189,7 +186,6 @@ bool tx_init(MagSetting* setting) {
|
|
|
tx_init_rfid();
|
|
|
break;
|
|
|
case MagTxStateGPIO:
|
|
|
- furi_hal_power_enable_otg();
|
|
|
// gpio_item_configure_all_pins(GpioModeOutputPushPull);
|
|
|
furi_hal_gpio_init(GPIO_PIN_A, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
|
|
furi_hal_gpio_init(GPIO_PIN_B, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
|
|
@@ -208,7 +204,7 @@ bool tx_init(MagSetting* setting) {
|
|
|
tx_init_rfid();
|
|
|
break;
|
|
|
case MagTxStateNFC:
|
|
|
- furi_hal_nfc_exit_sleep();
|
|
|
+ //furi_hal_nfc_exit_sleep();
|
|
|
break;
|
|
|
case MagTxCC1101_434:
|
|
|
tx_init_rf(434000000);
|
|
|
@@ -234,9 +230,12 @@ bool tx_deinit(MagSetting* setting) {
|
|
|
furi_hal_gpio_write(GPIO_PIN_B, 0);
|
|
|
furi_hal_gpio_write(GPIO_PIN_ENABLE, 0);
|
|
|
|
|
|
- // set back to analog output mode?
|
|
|
+ // set back to analog output mode? - YES
|
|
|
+ furi_hal_gpio_init(GPIO_PIN_A, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
|
|
+ furi_hal_gpio_init(GPIO_PIN_B, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
|
|
+ furi_hal_gpio_init(GPIO_PIN_ENABLE, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
|
|
+
|
|
|
//gpio_item_configure_all_pins(GpioModeAnalog);
|
|
|
- furi_hal_power_disable_otg();
|
|
|
break;
|
|
|
case MagTxStatePiezo:
|
|
|
tx_deinit_piezo();
|
|
|
@@ -246,8 +245,8 @@ bool tx_deinit(MagSetting* setting) {
|
|
|
tx_deinit_rfid();
|
|
|
break;
|
|
|
case MagTxStateNFC:
|
|
|
- furi_hal_nfc_ll_txrx_off();
|
|
|
- furi_hal_nfc_start_sleep();
|
|
|
+ //furi_hal_nfc_ll_txrx_off();
|
|
|
+ //furi_hal_nfc_start_sleep();
|
|
|
break;
|
|
|
case MagTxCC1101_434:
|
|
|
case MagTxCC1101_868:
|