mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
85 lines
3.4 KiB
C
85 lines
3.4 KiB
C
/******************************************************************************/
|
|
/* */
|
|
/* Copyright (C) 2018, FLIR Systems */
|
|
/* All rights reserved. */
|
|
/* */
|
|
/* This document is controlled to FLIR Technology Level 2. The information */
|
|
/* contained in this document pertains to a dual use product controlled for */
|
|
/* export by the Export Administration Regulations (EAR). Diversion contrary */
|
|
/* to US law is prohibited. US Department of Commerce authorization is not */
|
|
/* required prior to export or transfer to foreign persons or parties unless */
|
|
/* otherwise prohibited. */
|
|
/* */
|
|
/******************************************************************************/
|
|
|
|
#ifndef FLIR_CHANNELS_H
|
|
#define FLIR_CHANNELS_H
|
|
|
|
#include <stdint.h>
|
|
#define CHANNEL_BUF_SIZ 1
|
|
|
|
#define SERVICE_UNRELATED_CHANNEL_ID (0xff)
|
|
|
|
struct t_CHANNEL_T {
|
|
uint8_t channel;
|
|
uint16_t start;
|
|
uint16_t len;
|
|
uint8_t buff[CHANNEL_BUF_SIZ];
|
|
};
|
|
typedef struct t_CHANNEL_T CHANNEL_T;
|
|
|
|
#define CHANNEL_INIT(_channel_list_index, _channel_id) \
|
|
do { \
|
|
chan_ptr = &(channel_list[_channel_list_index]); \
|
|
chan_ptr->channel = (_channel_id); \
|
|
chan_ptr->len = 0; \
|
|
chan_ptr->start = 0; \
|
|
} while (0)
|
|
|
|
|
|
#define NUM_CHANNELS 7
|
|
|
|
static CHANNEL_T *chan_ptr;
|
|
static CHANNEL_T *unframed_ptr;
|
|
static CHANNEL_T channel_list[NUM_CHANNELS];
|
|
|
|
extern void initialize_channels();
|
|
extern int32_t get_channel(uint8_t channel_ID, CHANNEL_T **return_channel);
|
|
extern void get_unframed(CHANNEL_T **return_channel);
|
|
extern void add_byte(uint8_t inbyte,CHANNEL_T *channel_ptr);
|
|
extern int32_t get_byte(uint8_t *outbyte,CHANNEL_T *channel_ptr);
|
|
|
|
/* Maybe later if number of channels becomes large.
|
|
int16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