RMT releated definition and function for RF433.
More...
#include <M5UnitComponent.hpp>
Go to the source code of this file.
|
| namespace | m5 |
| | Top level namespace of M5stack.
|
| |
|
|
using | m5::unit::rf433::container_type = std::vector<uint8_t> |
| | Container.
|
| |
|
using | m5::unit::rf433::item_container_type = std::vector<gpio::m5_rmt_item_t> |
| | Item container.
|
| |
|
using | m5::unit::rf433::communication_identifier_t = uint32_t |
| | Communication identifier.
|
| |
|
|
using | m5::unit::rf433::Protocol = uint8_t |
| | Protocol type.
|
| |
|
constexpr Protocol | m5::unit::rf433::ProtocolIncludeSendCount {0x01} |
| | Include send count.
|
| |
|
constexpr Protocol | m5::unit::rf433::ProtocolIncludeIdentifier {0x02} |
| | Include identifier.
|
| |
RMT releated definition and function for RF433.
◆ decodeManchester()
| uint16_t m5::unit::rf433::decodeManchester |
( |
uint8_t * | buf, |
|
|
const uint16_t | buf_size, |
|
|
const m5::unit::gpio::m5_rmt_item_t * | data, |
|
|
const uint32_t | num, |
|
|
const bool | MSB = true ) |
Decode manchester.
- Parameters
-
| buf | Output buffer @paran buf_sizr Output buffer size |
| data | RMT data (exclude SOF) |
| Number | of the RMT items |
| MSB | Process from MSB if true |
- Returns
- Decoded count
◆ encodeManchester()
| item_container_type m5::unit::rf433::encodeManchester |
( |
const uint8_t * | data, |
|
|
const uint32_t | len, |
|
|
const bool | MSB = true ) |
Encode manchester.
- Parameters
-
| data | Input buffer |
| Length | of input buffer |
| MSB | Process from MSB if true |
- Returns
- Encoded container