Improve editor folding (some editors use indentation as cue)

This commit is contained in:
Henry Gabryjelski 2024-05-14 19:16:37 -07:00
commit b7fff95b7c

View file

@ -30,6 +30,8 @@ static em4x70_tag_t tag = { 0 };
// EM4170 requires a parity bit on commands, other variants do not. // EM4170 requires a parity bit on commands, other variants do not.
static bool command_parity = true; static bool command_parity = true;
#if 1 // Calculation of ticks for timing functions
// Conversion from Ticks to RF periods // Conversion from Ticks to RF periods
// 1 us = 1.5 ticks // 1 us = 1.5 ticks
// 1RF Period = 8us = 12 Ticks // 1RF Period = 8us = 12 Ticks
@ -55,11 +57,15 @@ static bool command_parity = true;
#define EM4X70_COMMAND_RETRIES 5 // Attempts to send/read command #define EM4X70_COMMAND_RETRIES 5 // Attempts to send/read command
#define EM4X70_MAX_RECEIVE_LENGTH 96 // Maximum bits to expect from any command #define EM4X70_MAX_RECEIVE_LENGTH 96 // Maximum bits to expect from any command
#endif // Calculation of ticks for timing functions
#if 1 // EM4x70 Command IDs
/** /**
* These IDs are from the EM4170 datasheet * These IDs are from the EM4170 datasheet.
* Some versions of the chip require a * Some versions of the chip require a
* (even) parity bit, others do not * (even) parity bit, others do not.
* The command is thus stored only in the
* three least significant bits (mask 0x07).
*/ */
#define EM4X70_COMMAND_ID 0x01 #define EM4X70_COMMAND_ID 0x01
#define EM4X70_COMMAND_UM1 0x02 #define EM4X70_COMMAND_UM1 0x02
@ -67,6 +73,7 @@ static bool command_parity = true;
#define EM4X70_COMMAND_PIN 0x04 #define EM4X70_COMMAND_PIN 0x04
#define EM4X70_COMMAND_WRITE 0x05 #define EM4X70_COMMAND_WRITE 0x05
#define EM4X70_COMMAND_UM2 0x07 #define EM4X70_COMMAND_UM2 0x07
#endif // EM4x70 Command IDs
// Constants used to determine high/low state of signal // Constants used to determine high/low state of signal
#define EM4X70_NOISE_THRESHOLD 13 // May depend on noise in environment #define EM4X70_NOISE_THRESHOLD 13 // May depend on noise in environment