mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-09 23:18:10 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into xfw-dev
This commit is contained in:
@@ -26,9 +26,9 @@ extern "C" {
|
||||
// DigitalSignal uses 10 picosecond time units (1 tick = 10 ps).
|
||||
// Use the macros below to convert the time from other units.
|
||||
|
||||
#define DIGITAL_SIGNAL_MS(x) ((x)*100000000UL)
|
||||
#define DIGITAL_SIGNAL_US(x) ((x)*100000UL)
|
||||
#define DIGITAL_SIGNAL_NS(x) ((x)*100UL)
|
||||
#define DIGITAL_SIGNAL_MS(x) ((x) * 100000000UL)
|
||||
#define DIGITAL_SIGNAL_US(x) ((x) * 100000UL)
|
||||
#define DIGITAL_SIGNAL_NS(x) ((x) * 100UL)
|
||||
#define DIGITAL_SIGNAL_PS(x) ((x) / 10UL)
|
||||
|
||||
typedef struct DigitalSignal DigitalSignal;
|
||||
|
||||
@@ -11,7 +11,7 @@ extern "C" {
|
||||
#define ISO14443_3A_POLLER_MAX_BUFFER_SIZE (512U)
|
||||
|
||||
#define ISO14443_3A_POLLER_SEL_CMD(cascade_lvl) (0x93 + 2 * (cascade_lvl))
|
||||
#define ISO14443_3A_POLLER_SEL_PAR(bytes, bits) (((bytes) << 4 & 0xf0U) | ((bits)&0x0fU))
|
||||
#define ISO14443_3A_POLLER_SEL_PAR(bytes, bits) (((bytes) << 4 & 0xf0U) | ((bits) & 0x0fU))
|
||||
#define ISO14443_3A_POLLER_SDD_CL (0x88U)
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Algorithm from https://github.com/RfidResearchGroup/proxmark3.git
|
||||
|
||||
#define SWAPENDIAN(x) \
|
||||
((x) = ((x) >> 8 & 0xff00ff) | ((x)&0xff00ff) << 8, (x) = (x) >> 16 | (x) << 16)
|
||||
((x) = ((x) >> 8 & 0xff00ff) | ((x) & 0xff00ff) << 8, (x) = (x) >> 16 | (x) << 16)
|
||||
#define LF_POLY_ODD (0x29CE5C)
|
||||
#define LF_POLY_EVEN (0x870804)
|
||||
|
||||
|
||||
@@ -212,8 +212,8 @@ uint32_t pulse_reader_receive(PulseReader* signal, int timeout_us) {
|
||||
|
||||
/* probably larger values, so choose a wider data type */
|
||||
if(signal->unit_divider > 1) {
|
||||
delta_unit =
|
||||
(uint32_t)((uint64_t)delta * (uint64_t)signal->unit_multiplier / signal->unit_divider);
|
||||
delta_unit = (uint32_t)((uint64_t)delta * (uint64_t)signal->unit_multiplier /
|
||||
signal->unit_divider);
|
||||
} else {
|
||||
delta_unit = delta * signal->unit_multiplier;
|
||||
}
|
||||
|
||||
+2
-2
@@ -688,8 +688,8 @@ uint8_t u8x8_byte_sed1520(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_
|
||||
|
||||
#define U8X8_MSG_GPIO(x) (64 + (x))
|
||||
#ifdef U8X8_USE_PINS
|
||||
#define u8x8_GetPinIndex(u8x8, msg) ((msg)&0x3f)
|
||||
#define u8x8_GetPinValue(u8x8, msg) ((u8x8)->pins[(msg)&0x3f])
|
||||
#define u8x8_GetPinIndex(u8x8, msg) ((msg) & 0x3f)
|
||||
#define u8x8_GetPinValue(u8x8, msg) ((u8x8)->pins[(msg) & 0x3f])
|
||||
#endif
|
||||
|
||||
#define U8X8_MSG_GPIO_D0 U8X8_MSG_GPIO(U8X8_PIN_D0)
|
||||
|
||||
Reference in New Issue
Block a user