mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-19 01:03:22 +00:00
8073992925
* RFID: pull antenna down when emulating * Rfid: fixed HID emulation by adding zero pulse every 4 bits * Rfid: HID emulation fixed with DSP based FSK oscillator. * Rfid: receive 125KHz clock for emulation timer from antenna and comparator * Rfid: commented unused variable * Firmware: rollback changes in f6. * Add F7 target based on F6. * F7/F6: update cube projects, apply changes to the targets, update linker scripts with correct RAM start values. * FuriHal: RFID init routine. * Scripts: update OTP tool for v11 board Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
120 lines
No EOL
2.1 KiB
C
120 lines
No EOL
2.1 KiB
C
#pragma once
|
||
#include <stdint.h>
|
||
#include <stdbool.h>
|
||
#include <main.h>
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
/** Initialize RFID subsystem */
|
||
void furi_hal_rfid_init();
|
||
|
||
/**
|
||
* @brief config rfid pins to reset state
|
||
*
|
||
*/
|
||
void furi_hal_rfid_pins_reset();
|
||
|
||
/**
|
||
* @brief config rfid pins to emulate state
|
||
*
|
||
*/
|
||
void furi_hal_rfid_pins_emulate();
|
||
|
||
/**
|
||
* @brief config rfid pins to read state
|
||
*
|
||
*/
|
||
void furi_hal_rfid_pins_read();
|
||
|
||
/**
|
||
* @brief config rfid timer to read state
|
||
*
|
||
* @param freq timer frequency
|
||
* @param duty_cycle timer duty cycle, 0.0-1.0
|
||
*/
|
||
void furi_hal_rfid_tim_read(float freq, float duty_cycle);
|
||
|
||
/**
|
||
* @brief start read timer
|
||
*
|
||
*/
|
||
void furi_hal_rfid_tim_read_start();
|
||
|
||
/**
|
||
* @brief stop read timer
|
||
*
|
||
*/
|
||
void furi_hal_rfid_tim_read_stop();
|
||
|
||
/**
|
||
* @brief config rfid timer to emulate state
|
||
*
|
||
* @param freq timer frequency
|
||
*/
|
||
void furi_hal_rfid_tim_emulate(float freq);
|
||
|
||
/**
|
||
* @brief start emulation timer
|
||
*
|
||
*/
|
||
void furi_hal_rfid_tim_emulate_start();
|
||
|
||
/**
|
||
* @brief stop emulation timer
|
||
*
|
||
*/
|
||
void furi_hal_rfid_tim_emulate_stop();
|
||
|
||
/**
|
||
* @brief config rfid timers to reset state
|
||
*
|
||
*/
|
||
void furi_hal_rfid_tim_reset();
|
||
|
||
/**
|
||
* @brief check that timer instance is emulation timer
|
||
*
|
||
* @param hw timer instance
|
||
*/
|
||
bool furi_hal_rfid_is_tim_emulate(TIM_HandleTypeDef* hw);
|
||
|
||
/**
|
||
* @brief set emulation timer period
|
||
*
|
||
* @param period overall duration
|
||
*/
|
||
void furi_hal_rfid_set_emulate_period(uint32_t period);
|
||
|
||
/**
|
||
* @brief set emulation timer pulse
|
||
*
|
||
* @param pulse duration of high level
|
||
*/
|
||
void furi_hal_rfid_set_emulate_pulse(uint32_t pulse);
|
||
|
||
/**
|
||
* @brief set read timer period
|
||
*
|
||
* @param period overall duration
|
||
*/
|
||
void furi_hal_rfid_set_read_period(uint32_t period);
|
||
|
||
/**
|
||
* @brief set read timer pulse
|
||
*
|
||
* @param pulse duration of high level
|
||
*/
|
||
void furi_hal_rfid_set_read_pulse(uint32_t pulse);
|
||
|
||
/**
|
||
* Сhanges the configuration of the RFID timer "on a fly"
|
||
* @param freq new frequency
|
||
* @param duty_cycle new duty cycle
|
||
*/
|
||
void furi_hal_rfid_change_read_config(float freq, float duty_cycle);
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif |