mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-06 05:34:50 -04:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -33,37 +33,36 @@
|
|||
namespace ax25 {
|
||||
|
||||
enum protocol_id_t {
|
||||
X25_PLP = 0x01,
|
||||
COMP_TCPIP = 0x06,
|
||||
UNCOMP_TCPIP = 0x07,
|
||||
SEG_FRAG = 0x08,
|
||||
FLEXNET = 0xCE,
|
||||
NO_LAYER3 = 0xF0
|
||||
X25_PLP = 0x01,
|
||||
COMP_TCPIP = 0x06,
|
||||
UNCOMP_TCPIP = 0x07,
|
||||
SEG_FRAG = 0x08,
|
||||
FLEXNET = 0xCE,
|
||||
NO_LAYER3 = 0xF0
|
||||
};
|
||||
|
||||
class AX25Frame {
|
||||
public:
|
||||
void make_ui_frame(char * const address, const uint8_t control, const uint8_t protocol,
|
||||
const std::string& info);
|
||||
|
||||
private:
|
||||
void NRZI_add_bit(const uint32_t bit);
|
||||
void make_extended_field(char * const data, size_t length);
|
||||
void add_byte(uint8_t byte, bool is_flag, bool is_data);
|
||||
void add_data(uint8_t byte);
|
||||
void add_checksum();
|
||||
void add_flag();
|
||||
void flush();
|
||||
|
||||
uint16_t * bb_data_ptr { nullptr };
|
||||
uint8_t current_bit { 0 };
|
||||
uint8_t current_byte { 0 };
|
||||
size_t bit_counter { 0 };
|
||||
uint8_t ones_counter { 0 };
|
||||
|
||||
CRC<16, true, true> crc_ccitt { 0x1021, 0xFFFF, 0xFFFF };
|
||||
public:
|
||||
void make_ui_frame(char* const address, const uint8_t control, const uint8_t protocol, const std::string& info);
|
||||
|
||||
private:
|
||||
void NRZI_add_bit(const uint32_t bit);
|
||||
void make_extended_field(char* const data, size_t length);
|
||||
void add_byte(uint8_t byte, bool is_flag, bool is_data);
|
||||
void add_data(uint8_t byte);
|
||||
void add_checksum();
|
||||
void add_flag();
|
||||
void flush();
|
||||
|
||||
uint16_t* bb_data_ptr{nullptr};
|
||||
uint8_t current_bit{0};
|
||||
uint8_t current_byte{0};
|
||||
size_t bit_counter{0};
|
||||
uint8_t ones_counter{0};
|
||||
|
||||
CRC<16, true, true> crc_ccitt{0x1021, 0xFFFF, 0xFFFF};
|
||||
};
|
||||
|
||||
} /* namespace ax25 */
|
||||
|
||||
#endif/*__AX25_H__*/
|
||||
#endif /*__AX25_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue