Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
#include <stdio.h>
#include <string.h>
#include "NuMicro.h"
#include "cascoda-bm/cascoda_usb.h"
#include "cascoda-bm/cascoda_usbhid.h"
#include "cascoda-util/cascoda_hash.h"
#include "ldrom_hid.h"
Macros | |
#define | EP0_MAX_PKT_SIZE HID_CTRL_MAX_SIZE |
#define | EP1_MAX_PKT_SIZE HID_CTRL_MAX_SIZE |
#define | EP2_MAX_PKT_SIZE HID_FRAGMENT_SIZE |
#define | EP3_MAX_PKT_SIZE HID_FRAGMENT_SIZE |
#define | INT_IN_EP_NUM HID_IN_EP_NO |
#define | INT_OUT_EP_NUM HID_OUT_EP_NO |
#define | SETUP_BUF_BASE 0 |
#define | SETUP_BUF_LEN 8 |
#define | EP0_BUF_BASE (SETUP_BUF_BASE + SETUP_BUF_LEN) |
#define | EP0_BUF_LEN EP0_MAX_PKT_SIZE |
#define | EP1_BUF_BASE (SETUP_BUF_BASE + SETUP_BUF_LEN) |
#define | EP1_BUF_LEN EP1_MAX_PKT_SIZE |
#define | EP2_BUF_BASE (EP1_BUF_BASE + EP1_BUF_LEN) |
#define | EP2_BUF_LEN EP2_MAX_PKT_SIZE |
#define | EP3_BUF_BASE (EP2_BUF_BASE + EP2_BUF_LEN) |
#define | EP3_BUF_LEN EP3_MAX_PKT_SIZE |
#define | MAX_FRAG_SIZE 64 |
#define | FRAG_LEN_MASK 0x3F |
#define | FRAG_LAST_MASK (1 << 7) |
#define | FRAG_FIRST_MASK (1 << 6) |
Functions | |
void | EP2_Handler (void) |
void | EP3_Handler (void) |
void | RxHandled (void) |
void | TxReady (void) |
uint64_t | HASH_fnv1a_64 (const void *data_in, size_t num_bytes) |
Calculate the 64-bit fnv1a non-crypto hash of a block of data. More... | |
void | HID_Init (void) |
USBD Endpoint Config. More... | |
Variables | |
struct SerialBuf | gRxBuffer |
struct SerialBuf | gTxBuffer |
uint8_t | gu8BOSDescriptor [] |
const S_USBD_INFO_T | gsInfo |
#define EP0_BUF_BASE (SETUP_BUF_BASE + SETUP_BUF_LEN) |
#define EP0_BUF_LEN EP0_MAX_PKT_SIZE |
#define EP0_MAX_PKT_SIZE HID_CTRL_MAX_SIZE |
#define EP1_BUF_BASE (SETUP_BUF_BASE + SETUP_BUF_LEN) |
#define EP1_BUF_LEN EP1_MAX_PKT_SIZE |
#define EP1_MAX_PKT_SIZE HID_CTRL_MAX_SIZE |
#define EP2_BUF_BASE (EP1_BUF_BASE + EP1_BUF_LEN) |
#define EP2_BUF_LEN EP2_MAX_PKT_SIZE |
#define EP2_MAX_PKT_SIZE HID_FRAGMENT_SIZE |
#define EP3_BUF_BASE (EP2_BUF_BASE + EP2_BUF_LEN) |
#define EP3_BUF_LEN EP3_MAX_PKT_SIZE |
#define EP3_MAX_PKT_SIZE HID_FRAGMENT_SIZE |
#define FRAG_FIRST_MASK (1 << 6) |
#define FRAG_LAST_MASK (1 << 7) |
#define FRAG_LEN_MASK 0x3F |
#define INT_IN_EP_NUM HID_IN_EP_NO |
#define INT_OUT_EP_NUM HID_OUT_EP_NO |
#define MAX_FRAG_SIZE 64 |
#define SETUP_BUF_BASE 0 |
#define SETUP_BUF_LEN 8 |
void EP2_Handler | ( | void | ) |
void EP3_Handler | ( | void | ) |
void HID_Init | ( | void | ) |
USBD Endpoint Config.
void RxHandled | ( | void | ) |
void TxReady | ( | void | ) |
struct SerialBuf gRxBuffer |
const S_USBD_INFO_T gsInfo |
struct SerialBuf gTxBuffer |
uint8_t gu8BOSDescriptor[] |