Welcome to mirror list, hosted at ThFree Co, Russian Federation.

furi_hal_rfid.h « furi_hal_include « targets « firmware - github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4831e6a2f18e36cc510ac5dfc82f0d59e3b52387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/**
 * @file furi_hal_rfid.h
 * RFID HAL API
 */

#pragma once

#include <stdint.h>
#include <stdbool.h>
#include <main.h>

#ifdef __cplusplus
extern "C" {
#endif

/** Initialize RFID subsystem
 */
void furi_hal_rfid_init();

/** Config rfid pins to reset state
 */
void furi_hal_rfid_pins_reset();

/** Config rfid pins to emulate state
 */
void furi_hal_rfid_pins_emulate();

/** Config rfid pins to read state
 */
void furi_hal_rfid_pins_read();

/** Release rfid pull pin
 */
void furi_hal_rfid_pin_pull_release();

/** Pulldown rfid pull pin
 */
void furi_hal_rfid_pin_pull_pulldown();

/** 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);

/** Start read timer
 */
void furi_hal_rfid_tim_read_start();

/** Stop read timer
 */
void furi_hal_rfid_tim_read_stop();

/** Config rfid timer to emulate state
 *
 * @param      freq  timer frequency
 */
void furi_hal_rfid_tim_emulate(float freq);

/** Start emulation timer
 */
void furi_hal_rfid_tim_emulate_start();

/** Stop emulation timer
 */
void furi_hal_rfid_tim_emulate_stop();

/** Config rfid timers to reset state
 */
void furi_hal_rfid_tim_reset();

/** Check that timer instance is emulation timer
 *
 * @param      hw    timer instance
 *
 * @return     true if instance is emulation timer
 */
bool furi_hal_rfid_is_tim_emulate(TIM_HandleTypeDef* hw);

/** Set emulation timer period
 *
 * @param      period  overall duration
 */
void furi_hal_rfid_set_emulate_period(uint32_t period);

/** Set emulation timer pulse
 *
 * @param      pulse  duration of high level
 */
void furi_hal_rfid_set_emulate_pulse(uint32_t pulse);

/** Set read timer period
 *
 * @param      period  overall duration
 */
void furi_hal_rfid_set_read_period(uint32_t period);

/** 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