minipix_uart_interface
A library and examples for the MiniPIX UART interface
|
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
Go to the source code of this file.
Macros | |
#define | LLCP_COMM_HEXADECIMAL 0 |
#define | LLCP_APPEND_ENDL 0 |
#define | LLCP_DEBUG_PRINT 0 |
#define | MAX_PAYLOAD_LEN 255 |
#define | LLCP_CHECK_CHECKSUM 0 |
#define | INIT_LEN 1 |
#define | PAYLOAD_SIZE_LEN 1 |
#define | CHECKSUM_LEN 1 |
#define | ENDL_LEN 0 |
#define | LLCP_RX_TX_BUFFER_SIZE (INIT_LEN + PAYLOAD_SIZE_LEN + MAX_PAYLOAD_LEN + CHECKSUM_LEN + ENDL_LEN) |
Enumerations | |
enum | LLCP_ReceiverState_t { WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3, WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3, WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3, WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3, WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3, WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3, WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3, WAITING_FOR_MESSSAGE = 0, EXPECTING_SIZE = 1, EXPECTING_PAYLOAD = 2, EXPECTING_CHECKSUM = 3 } |
state machine states for the LLCP receiver (binary transfer) More... | |
Functions | |
struct | __attribute__ ((packed)) |
Structure for interpreting the ToA and ToT mode can be used only after derandomization of the data. More... | |
uint8_t | llcp_hex2bin (const uint8_t *ptr) |
void | llcp_bin2hex (const uint8_t byte, uint8_t *buffer) |
convert a single byte to hexadecimal More... | |
void | llcp_initialize (LLCP_Receiver_t *receiver) |
bool | llcp_processChar (const uint8_t char_in, LLCP_Receiver_t *receiver, LLCP_Message_t **message, bool *checksum_matched) |
uint16_t | llcp_prepareMessage (uint8_t *what, uint8_t len, uint8_t *buffer) |
Variables | |
LLCP_Receiver_t | |
LLCP_Message_t | |
#define CHECKSUM_LEN 1 |
#define ENDL_LEN 0 |
#define INIT_LEN 1 |
#define LLCP_APPEND_ENDL 0 |
#define LLCP_CHECK_CHECKSUM 0 |
#define LLCP_COMM_HEXADECIMAL 0 |
#define LLCP_DEBUG_PRINT 0 |
#define LLCP_RX_TX_BUFFER_SIZE (INIT_LEN + PAYLOAD_SIZE_LEN + MAX_PAYLOAD_LEN + CHECKSUM_LEN + ENDL_LEN) |
#define MAX_PAYLOAD_LEN 255 |
#define PAYLOAD_SIZE_LEN 1 |
enum LLCP_ReceiverState_t |
state machine states for the LLCP receiver (binary transfer)
struct __attribute__ | ( | (packed) | ) |
Structure for interpreting the ToA and ToT mode can be used only after derandomization of the data.
LLCP Message for error from MiniPIX.
Message data for LLCP_MinipixErrorMsg_t.
LLCP Message for requesting a MiniPIX temperature.
LLCP Message for MiniPIX temperature.
Message data for LLCP_TemperatureMsg_t.
LLCP Message for requesting a MiniPIX status.
LLCP Message for MiniPIX status.
Message data for LLCP_StatusMsg_t.
Message data for LLCP_PwrReqMsg_t.
LLCP Message for sending "ack".
Message data for LLCP_AckMsg_t.
Message data for LLCP_SetConfigurationPresetReqMsg_t.
Message data for LLCP_SetThresholdReqMsg_t.
LLCP Message for updating a pixel mask.
Message data for LLCP_UpdatePixelMaskReqMsg_t.
LLCP Message for requesting data from a previously-measured frame.
LLCP Message for getting noticed that MiniPIX measurement had just finished.
LLCP Message for requesting a frame measurement.
Message data for LLCP_MeasureFrameReqMsg_t.
Message data for LLCP_FrameDataTerminatorMsg_t.
LLCP Message for sending image data.
Message data for LLCP_FrameDataMsg_t.
Structure for holding pixel coordinates and measured pixel values.
Structure for interpreting the Mpx and iToT mode can be used only after derandomization of the data.
Structure for interpreting the ToA mode can be used only after derandomization of the data.
void llcp_bin2hex | ( | const uint8_t | x, |
uint8_t * | buffer | ||
) |
convert a single byte to hexadecimal
x | the byte to convert |
buffer | pointer to a 2-char buffer for the result |
uint8_t llcp_hex2bin | ( | const uint8_t * | ptr | ) |
void llcp_initialize | ( | LLCP_Receiver_t * | receiver | ) |
uint16_t llcp_prepareMessage | ( | uint8_t * | what, |
uint8_t | len, | ||
uint8_t * | buffer | ||
) |
bool llcp_processChar | ( | const uint8_t | char_in, |
LLCP_Receiver_t * | receiver, | ||
LLCP_Message_t ** | message, | ||
bool * | checksum_matched | ||
) |
LLCP_Message_t |
LLCP_Receiver_t |