Working PL2303 emulator (usbcdc)

This commit is contained in:
eddyem 2018-10-23 14:34:26 +03:00
parent 8da9cdf51b
commit 913b909342
12 changed files with 880 additions and 444 deletions

View File

@ -8,7 +8,7 @@ MCU = F042x6
# hardware definitions # hardware definitions
DEFS += -DUSARTNUM=1 DEFS += -DUSARTNUM=1
#DEFS += -DCHECK_TMOUT #DEFS += -DCHECK_TMOUT
DEFS += -DEBUG #DEFS += -DEBUG
# change this linking script depending on particular MCU model, # change this linking script depending on particular MCU model,
# for example, if you have STM32F103VBT6, you should write: # for example, if you have STM32F103VBT6, you should write:
LDSCRIPT = ld/stm32f042k.ld LDSCRIPT = ld/stm32f042k.ld
@ -48,7 +48,7 @@ STARTUP = $(OBJDIR)/startup.o
OBJS += $(STARTUP) OBJS += $(STARTUP)
DEPS := $(OBJS:.o=.d) DEPS := $(OBJS:.o=.d)
INC_DIR ?= ../inc INC_DIR ?= ../../inc
INCLUDE := -I$(INC_DIR)/F0 -I$(INC_DIR)/cm INCLUDE := -I$(INC_DIR)/F0 -I$(INC_DIR)/cm
LIB_DIR := $(INC_DIR)/ld LIB_DIR := $(INC_DIR)/ld

View File

@ -106,6 +106,7 @@ void CAN_reinit(){
} }
void CAN_setup(){ void CAN_setup(){
uint32_t tmout = 16000000;
if(CANID == 0xFFFF) readCANID(); if(CANID == 0xFFFF) readCANID();
// Configure GPIO: PB8 - CAN_Rx, PB9 - CAN_Tx // Configure GPIO: PB8 - CAN_Rx, PB9 - CAN_Tx
/* (1) Select AF mode (10) on PB8 and PB9 */ /* (1) Select AF mode (10) on PB8 and PB9 */
@ -132,16 +133,17 @@ void CAN_setup(){
CAN->MCR |= CAN_MCR_INRQ; /* (1) */ CAN->MCR |= CAN_MCR_INRQ; /* (1) */
while((CAN->MSR & CAN_MSR_INAK)!=CAN_MSR_INAK) /* (2) */ while((CAN->MSR & CAN_MSR_INAK)!=CAN_MSR_INAK) /* (2) */
{ {
/* add time out here for a robust application */ if(--tmout == 0) break;
} }
CAN->MCR &=~ CAN_MCR_SLEEP; /* (3) */ CAN->MCR &=~ CAN_MCR_SLEEP; /* (3) */
CAN->MCR |= CAN_MCR_ABOM; CAN->MCR |= CAN_MCR_ABOM;
CAN->BTR |= 2 << 20 | 3 << 16 | 59 << 0; /* (4) */ CAN->BTR |= 2 << 20 | 3 << 16 | 59 << 0; /* (4) */
CAN->MCR &=~ CAN_MCR_INRQ; /* (5) */ CAN->MCR &=~ CAN_MCR_INRQ; /* (5) */
tmout = 16000000;
while((CAN->MSR & CAN_MSR_INAK)==CAN_MSR_INAK) /* (6) */ while((CAN->MSR & CAN_MSR_INAK)==CAN_MSR_INAK) /* (6) */
{ {
/* add time out here for a robust application */ if(--tmout == 0) break;
} }
CAN->FMR = CAN_FMR_FINIT; /* (7) */ CAN->FMR = CAN_FMR_FINIT; /* (7) */
CAN->FA1R = CAN_FA1R_FACT0; /* (8) */ CAN->FA1R = CAN_FA1R_FACT0; /* (8) */

View File

@ -33,11 +33,12 @@ void sys_tick_handler(void){
} }
void iwdg_setup(){ void iwdg_setup(){
uint32_t tmout = 16000000;
/* Enable the peripheral clock RTC */ /* Enable the peripheral clock RTC */
/* (1) Enable the LSI (40kHz) */ /* (1) Enable the LSI (40kHz) */
/* (2) Wait while it is not ready */ /* (2) Wait while it is not ready */
RCC->CSR |= RCC_CSR_LSION; /* (1) */ RCC->CSR |= RCC_CSR_LSION; /* (1) */
while((RCC->CSR & RCC_CSR_LSIRDY) != RCC_CSR_LSIRDY); /* (2) */ while((RCC->CSR & RCC_CSR_LSIRDY) != RCC_CSR_LSIRDY){if(--tmout == 0) break;} /* (2) */
/* Configure IWDG */ /* Configure IWDG */
/* (1) Activate IWDG (not needed if done in option bytes) */ /* (1) Activate IWDG (not needed if done in option bytes) */
/* (2) Enable write access to IWDG registers */ /* (2) Enable write access to IWDG registers */
@ -49,7 +50,8 @@ void iwdg_setup(){
IWDG->KR = IWDG_WRITE_ACCESS; /* (2) */ IWDG->KR = IWDG_WRITE_ACCESS; /* (2) */
IWDG->PR = IWDG_PR_PR_1; /* (3) */ IWDG->PR = IWDG_PR_PR_1; /* (3) */
IWDG->RLR = 1250; /* (4) */ IWDG->RLR = 1250; /* (4) */
while(IWDG->SR); /* (5) */ tmout = 16000000;
while(IWDG->SR){if(--tmout == 0) break;} /* (5) */
IWDG->KR = IWDG_REFRESH; /* (6) */ IWDG->KR = IWDG_REFRESH; /* (6) */
} }
@ -134,6 +136,9 @@ int main(void){
printuhex(getCANID()); printuhex(getCANID());
newline(); newline();
break; break;
case 'U':
USB_send("Test string for USB\n");
break;
case 'W': case 'W':
SEND("Wait for reboot\n"); SEND("Wait for reboot\n");
while(1){nop();}; while(1){nop();};
@ -146,11 +151,13 @@ int main(void){
"'G' - get CAN address\n" "'G' - get CAN address\n"
"'R' - software reset\n" "'R' - software reset\n"
"'S' - reinit CAN (with new address)\n" "'S' - reinit CAN (with new address)\n"
"'U' - send test string over USB\n"
"'W' - test watchdog\n" "'W' - test watchdog\n"
); );
break; break;
} }
} }
transmit_tbuf();
} }
if(L){ // text waits for sending if(L){ // text waits for sending
txt[L] = 0; txt[L] = 0;

View File

@ -1,4 +1,4 @@
/*us /*
* usart.c * usart.c
* *
* Copyright 2017 Edward V. Emelianoff <eddy@sao.ru, edward.emelianoff@gmail.com> * Copyright 2017 Edward V. Emelianoff <eddy@sao.ru, edward.emelianoff@gmail.com>
@ -54,7 +54,8 @@ int usart_getline(char **line){
// transmit current tbuf and swap buffers // transmit current tbuf and swap buffers
void transmit_tbuf(){ void transmit_tbuf(){
while(!txrdy); // wait for previos buffer transmission uint32_t tmout = 16000000;
while(!txrdy){if(--tmout == 0) break;}; // wait for previos buffer transmission
register int l = odatalen[tbufno]; register int l = odatalen[tbufno];
if(!l) return; if(!l) return;
txrdy = 0; txrdy = 0;
@ -81,7 +82,8 @@ void usart_putchar(const char ch){
} }
void usart_send(const char *str){ void usart_send(const char *str){
while(*str){ uint32_t x = 512;
while(*str && --x){
if(odatalen[tbufno] == UARTBUFSZO) transmit_tbuf(); if(odatalen[tbufno] == UARTBUFSZO) transmit_tbuf();
tbuf[tbufno][odatalen[tbufno]++] = *str++; tbuf[tbufno][odatalen[tbufno]++] = *str++;
} }
@ -95,6 +97,7 @@ void newline(){
void usart_setup(){ void usart_setup(){
// Nucleo's USART2 connected to VCP proxy of st-link // Nucleo's USART2 connected to VCP proxy of st-link
uint32_t tmout = 16000000;
#if USARTNUM == 2 #if USARTNUM == 2
// setup pins: PA2 (Tx - AF1), PA15 (Rx - AF1) // setup pins: PA2 (Tx - AF1), PA15 (Rx - AF1)
// AF mode (AF1) // AF mode (AF1)
@ -116,7 +119,7 @@ void usart_setup(){
USART2->BRR = 480000 / 1152; USART2->BRR = 480000 / 1152;
USART2->CR3 = USART_CR3_DMAT; // enable DMA Tx USART2->CR3 = USART_CR3_DMAT; // enable DMA Tx
USART2->CR1 = USART_CR1_TE | USART_CR1_RE | USART_CR1_UE; // 1start,8data,nstop; enable Rx,Tx,USART USART2->CR1 = USART_CR1_TE | USART_CR1_RE | USART_CR1_UE; // 1start,8data,nstop; enable Rx,Tx,USART
while(!(USART2->ISR & USART_ISR_TC)); // polling idle frame Transmission while(!(USART2->ISR & USART_ISR_TC)){if(--tmout == 0) break;} // polling idle frame Transmission
USART2->ICR |= USART_ICR_TCCF; // clear TC flag USART2->ICR |= USART_ICR_TCCF; // clear TC flag
USART2->CR1 |= USART_CR1_RXNEIE; USART2->CR1 |= USART_CR1_RXNEIE;
NVIC_EnableIRQ(USART2_IRQn); NVIC_EnableIRQ(USART2_IRQn);
@ -140,7 +143,7 @@ void usart_setup(){
USART1->BRR = 480000 / 1152; USART1->BRR = 480000 / 1152;
USART1->CR3 = USART_CR3_DMAT; // enable DMA Tx USART1->CR3 = USART_CR3_DMAT; // enable DMA Tx
USART1->CR1 = USART_CR1_TE | USART_CR1_RE | USART_CR1_UE; // 1start,8data,nstop; enable Rx,Tx,USART USART1->CR1 = USART_CR1_TE | USART_CR1_RE | USART_CR1_UE; // 1start,8data,nstop; enable Rx,Tx,USART
while(!(USART1->ISR & USART_ISR_TC)); // polling idle frame Transmission while(!(USART1->ISR & USART_ISR_TC)){if(--tmout == 0) break;} // polling idle frame Transmission
USART1->ICR |= USART_ICR_TCCF; // clear TC flag USART1->ICR |= USART_ICR_TCCF; // clear TC flag
USART1->CR1 |= USART_CR1_RXNEIE; USART1->CR1 |= USART_CR1_RXNEIE;
NVIC_EnableIRQ(USART1_IRQn); NVIC_EnableIRQ(USART1_IRQn);
@ -224,13 +227,26 @@ void printuhex(uint32_t val){
int i, j; int i, j;
for(i = 0; i < 4; ++i, --ptr){ for(i = 0; i < 4; ++i, --ptr){
for(j = 1; j > -1; --j){ for(j = 1; j > -1; --j){
uint8_t half = (*ptr >> (4*j)) & 0x0f; register uint8_t half = (*ptr >> (4*j)) & 0x0f;
if(half < 10) usart_putchar(half + '0'); if(half < 10) usart_putchar(half + '0');
else usart_putchar(half - 10 + 'a'); else usart_putchar(half - 10 + 'a');
} }
} }
} }
// dump memory buffer
void hexdump(uint8_t *arr, uint16_t len){
for(uint16_t l = 0; l < len; ++l, ++arr){
for(int16_t j = 1; j > -1; --j){
register uint8_t half = (*arr >> (4*j)) & 0x0f;
if(half < 10) usart_putchar(half + '0');
else usart_putchar(half - 10 + 'a');
}
if(l % 16 == 15) usart_putchar('\n');
else if(l & 1) usart_putchar(' ');
}
}
#if USARTNUM == 2 #if USARTNUM == 2
void dma1_channel4_5_isr(){ void dma1_channel4_5_isr(){
if(DMA1->ISR & DMA_ISR_TCIF4){ // Tx if(DMA1->ISR & DMA_ISR_TCIF4){ // Tx

View File

@ -40,11 +40,6 @@
#else #else
#define MSG(str) #define MSG(str)
#endif #endif
/*
typedef enum{
ALL_OK,
LINE_BUSY
} TXstatus;*/
#define usartrx() (linerdy) #define usartrx() (linerdy)
#define usartovr() (bufovr) #define usartovr() (bufovr)
@ -59,5 +54,6 @@ void newline();
void usart_putchar(const char ch); void usart_putchar(const char ch);
void printu(uint32_t val); void printu(uint32_t val);
void printuhex(uint32_t val); void printuhex(uint32_t val);
void hexdump(uint8_t *arr, uint16_t len);
#endif // __USART_H__ #endif // __USART_H__

View File

@ -23,95 +23,67 @@
#include "usb.h" #include "usb.h"
#include "usb_lib.h" #include "usb_lib.h"
#ifdef EBUG
#include "usart.h" #include "usart.h"
#endif
static uint8_t buffer[64];
static uint8_t buffer[BUFFSIZE+1];
static uint8_t len, rcvflag = 0; static uint8_t len, rcvflag = 0;
// interrupt IN handler (never used?)
static uint16_t EP1_Handler(ep_t ep){ static uint16_t EP1_Handler(ep_t ep){
if (ep.rx_flag){ //Пришли новые данные if (ep.rx_flag){
MSG("read\n");
EP_Read(1, buffer); EP_Read(1, buffer);
//EP_WriteIRQ(1, buffer, ep.rx_cnt); ep.status = SET_VALID_TX(ep.status);
ep.status = SET_VALID_TX(ep.status); //TX ep.status = KEEP_STAT_RX(ep.status);
ep.status = KEEP_STAT_RX(ep.status); //RX оставляем в NAK
} else } else
if (ep.tx_flag){ //Данные успешно переданы if (ep.tx_flag){
MSG("write\n"); ep.status = SET_VALID_RX(ep.status);
ep.status = SET_VALID_RX(ep.status); //RX в VALID ep.status = SET_STALL_TX(ep.status);
ep.status = SET_STALL_TX(ep.status); //TX в STALL
} }
return ep.status; return ep.status;
} }
// write handler // data IN/OUT handler
static uint16_t EP2_Handler(ep_t ep){ static uint16_t EP2_Handler(ep_t ep){
if(ep.rx_flag){ if(ep.rx_flag){
MSG("RX\n"); if(ep.rx_cnt > 0 && ep.rx_cnt < BUFFSIZE){
if(ep.rx_cnt > 0){
len = ep.rx_cnt;
rcvflag = 1; rcvflag = 1;
EP_Read(2, buffer); len = EP_Read(2, buffer);
buffer[len] = 0; buffer[len] = 0;
#ifdef EBUG
MSG("read: ");
if(len) SEND((char*)buffer);
#endif
} }
//Так как потверждение от хоста завершает транзакцию // end of transaction: clear DTOGs
//то сбрасываем DTOGи
ep.status = CLEAR_DTOG_RX(ep.status); ep.status = CLEAR_DTOG_RX(ep.status);
ep.status = CLEAR_DTOG_TX(ep.status); ep.status = CLEAR_DTOG_TX(ep.status);
//Так как мы ожидаем новый запрос от хоста, устанавливаем
//ep.status = SET_VALID_RX(ep.status);
ep.status = SET_STALL_TX(ep.status); ep.status = SET_STALL_TX(ep.status);
}else if (ep.tx_flag){ }else if (ep.tx_flag){
MSG("TX\n");
ep.status = KEEP_STAT_TX(ep.status); ep.status = KEEP_STAT_TX(ep.status);
/* //Ожидаем новый запрос, или повторное чтение данных (ошибка при передаче)
//поэтому Rx и Tx в VALID
ep.status = SET_VALID_RX(ep.status);
ep.status = SET_STALL_TX(ep.status);*/
} }
ep.status = SET_VALID_RX(ep.status); ep.status = SET_VALID_RX(ep.status);
return ep.status; return ep.status;
} }
/*
// read handler
static uint16_t EP3_Handler(ep_t ep){
MSG("EP3 ");
if (ep.rx_flag){ //Пришли новые данные
MSG("read");
//EP_Read(3, buffer);
ep.status = SET_VALID_TX(ep.status); //TX
ep.status = KEEP_STAT_RX(ep.status); //RX оставляем в NAK
} else
if (ep.tx_flag){ //Данные успешно переданы
MSG("write");
ep.status = SET_STALL_TX(ep.status);
//ep.status = SET_VALID_RX(ep.status); //RX в VALID
//ep.status = SET_STALL_TX(ep.status); //TX в STALL
}
MSG("; end\n");
return ep.status;
}*/
void USB_setup(){ void USB_setup(){
RCC->APB1ENR |= RCC_APB1ENR_CRSEN | RCC_APB1ENR_USBEN; // enable CRS (hsi48 sync) & USB RCC->APB1ENR |= RCC_APB1ENR_CRSEN | RCC_APB1ENR_USBEN; // enable CRS (hsi48 sync) & USB
RCC->CFGR3 &= ~RCC_CFGR3_USBSW; // reset USB RCC->CFGR3 &= ~RCC_CFGR3_USBSW; // reset USB
RCC->CR2 |= RCC_CR2_HSI48ON; // turn ON HSI48 RCC->CR2 |= RCC_CR2_HSI48ON; // turn ON HSI48
while(!(RCC->CR2 & RCC_CR2_HSI48RDY)); uint32_t tmout = 16000000;
while(!(RCC->CR2 & RCC_CR2_HSI48RDY)){if(--tmout == 0) break;}
FLASH->ACR = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY; FLASH->ACR = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY;
CRS->CFGR &= ~CRS_CFGR_SYNCSRC; CRS->CFGR &= ~CRS_CFGR_SYNCSRC;
CRS->CFGR |= CRS_CFGR_SYNCSRC_1; // USB SOF selected as sync source CRS->CFGR |= CRS_CFGR_SYNCSRC_1; // USB SOF selected as sync source
CRS->CR |= CRS_CR_AUTOTRIMEN; // enable auto trim CRS->CR |= CRS_CR_AUTOTRIMEN; // enable auto trim
CRS->CR |= CRS_CR_CEN; // enable freq counter & block CRS->CFGR as read-only CRS->CR |= CRS_CR_CEN; // enable freq counter & block CRS->CFGR as read-only
RCC->CFGR |= RCC_CFGR_SW; RCC->CFGR |= RCC_CFGR_SW;
//Разрешаем прерывания по RESET и CTRM // allow RESET and CTRM interrupts
USB -> CNTR = USB_CNTR_RESETM | USB_CNTR_CTRM; USB -> CNTR = USB_CNTR_RESETM | USB_CNTR_CTRM;
//Сбрасываем флаги // clear flags
USB -> ISTR = 0; USB -> ISTR = 0;
//Включаем подтяжку на D+ // and activate pullup
USB -> BCDR |= USB_BCDR_DPPU; USB -> BCDR |= USB_BCDR_DPPU;
NVIC_EnableIRQ(USB_IRQn); NVIC_EnableIRQ(USB_IRQn);
} }
@ -126,20 +98,32 @@ void usb_proc(){
// first free is 64; 768 - CAN data // first free is 64; 768 - CAN data
// free: 64 128 192 256 320 384 448 512 576 640 704 // free: 64 128 192 256 320 384 448 512 576 640 704
// (first 192 free bytes are for EP0) // (first 192 free bytes are for EP0)
EP_Init(1, EP_TYPE_INTERRUPT, 256, 320, EP1_Handler); EP_Init(1, EP_TYPE_INTERRUPT, 192, 192, EP1_Handler);
EP_Init(2, EP_TYPE_BULK, 384, 448, EP2_Handler); // out EP_Init(2, EP_TYPE_BULK, 256, 256, EP2_Handler); // OUT - receive data
EP_Init(3, EP_TYPE_BULK, 512, 576, EP2_Handler); // in EP_Init(3, EP_TYPE_BULK, 320, 320, EP2_Handler); // IN - transmit data
usbON = 1; usbON = 1;
}else{ }else{
if(rcvflag){ if(rcvflag){
MSG("read: "); /*
if(len) SEND((char*)buffer); * don't process received data here: if it would come too fast you will loose a part
SEND("\nNow write the data back\n"); * It would be a good idea to collect incoming data in greater buffer and process it
EP_Write(3, buffer, len); * later (EX: echo "text" > /dev/ttyUSB1 will split into two writings!
*/
rcvflag = 0; rcvflag = 0;
} }
if(SETLINECODING()){
SEND("got new linecoding");
CLRLINECODING();
}
} }
}else{ }else{
usbON = 0; usbON = 0;
} }
} }
void USB_send(char *buf){
uint16_t l = 0;
char *p = buf;
while(*p++) ++l;
EP_Write(3, (uint8_t*)buf, l);
}

View File

@ -26,7 +26,10 @@
#include "hardware.h" #include "hardware.h"
#define BUFFSIZE (64)
void USB_setup(); void USB_setup();
void usb_proc(); void usb_proc();
void USB_send(char *buf);
#endif // __USB_H__ #endif // __USB_H__

View File

@ -1,3 +1,26 @@
/*
* geany_encoding=koi8-r
* usb_defs.h
*
* Copyright 2018 Edward V. Emelianov <eddy@sao.ru, edward.emelianoff@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
#pragma once #pragma once
#ifndef __USB_DEFS_H__ #ifndef __USB_DEFS_H__
#define __USB_DEFS_H__ #define __USB_DEFS_H__

View File

@ -1,16 +1,44 @@
/*
* geany_encoding=koi8-r
* usb_lib.c
*
* Copyright 2018 Edward V. Emelianov <eddy@sao.ru, edward.emelianoff@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
#include <stdint.h> #include <stdint.h>
#include <wchar.h>
#include "usb_lib.h" #include "usb_lib.h"
#ifdef EBUG
#include <string.h> // memcpy #include <string.h> // memcpy
#include "usart.h" #include "usart.h"
#endif
#define EP0DATABUF_SIZE (64)
#define DEVICE_DESCRIPTOR_SIZE_BYTE (18) #define DEVICE_DESCRIPTOR_SIZE_BYTE (18)
#define DEVICE_QALIFIER_SIZE_BYTE (10) #define DEVICE_QALIFIER_SIZE_BYTE (10)
#define STRING_LANG_DESCRIPTOR_SIZE_BYTE (4) #define STRING_LANG_DESCRIPTOR_SIZE_BYTE (4)
static usb_LineCoding lineCoding = {115200, 0, 0, 8}; static usb_LineCoding lineCoding = {115200, 0, 0, 8};
static config_pack_t setup_packet;
static uint8_t ep0databuf[EP0DATABUF_SIZE];
static uint8_t ep0dbuflen = 0;
uint8_t setlinecoding = 0;
usb_LineCoding getLineCoding(){return lineCoding;}
const uint8_t USB_DeviceDescriptor[] = { const uint8_t USB_DeviceDescriptor[] = {
DEVICE_DESCRIPTOR_SIZE_BYTE, // bLength DEVICE_DESCRIPTOR_SIZE_BYTE, // bLength
@ -66,12 +94,9 @@ const uint8_t USB_ConfigDescriptor[] = {
0x00, /* bInterfaceNumber: Number of Interface */ 0x00, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */ 0x00, /* bAlternateSetting: Alternate setting */
0x03, /* bNumEndpoints: 3 endpoints used */ 0x03, /* bNumEndpoints: 3 endpoints used */
//0x02, /* bInterfaceClass: Communication Interface Class */ 0xff, /* bInterfaceClass */
//0x02, /* bInterfaceSubClass: Abstract Control Model */ 0x00, /* bInterfaceSubClass */
//0x01, /* bInterfaceProtocol: Common AT commands */ 0x00, /* bInterfaceProtocol */
0xff,
0x00,
0x00,
0x00, /* iInterface: */ 0x00, /* iInterface: */
/////////////////////////////////////////////////// ///////////////////////////////////////////////////
/*Endpoint 1 Descriptor*/ /*Endpoint 1 Descriptor*/
@ -79,13 +104,9 @@ const uint8_t USB_ConfigDescriptor[] = {
0x05, /* bDescriptorType: Endpoint */ 0x05, /* bDescriptorType: Endpoint */
0x81, /* bEndpointAddress IN1 */ 0x81, /* bEndpointAddress IN1 */
0x03, /* bmAttributes: Interrupt */ 0x03, /* bmAttributes: Interrupt */
//0x40, /* wMaxPacketSize LO: */ 0x0a, /* wMaxPacketSize LO: */
//0x00, /* wMaxPacketSize HI: */ 0x00, /* wMaxPacketSize HI: */
0x0a, 0x01, /* bInterval: */
0x00,
//0x10, /* bInterval: */
0x01,
/*---------------------------------------------------------------------------*/
/*Endpoint OUT2 Descriptor*/ /*Endpoint OUT2 Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */ 0x07, /* bLength: Endpoint Descriptor size */
@ -99,76 +120,64 @@ const uint8_t USB_ConfigDescriptor[] = {
/*Endpoint IN3 Descriptor*/ /*Endpoint IN3 Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */ 0x07, /* bLength: Endpoint Descriptor size */
0x05, /* bDescriptorType: Endpoint */ 0x05, /* bDescriptorType: Endpoint */
//0x82, /* bEndpointAddress IN2 */ 0x83, /* bEndpointAddress IN3 */
0x83, // IN3
0x02, /* bmAttributes: Bulk */ 0x02, /* bmAttributes: Bulk */
0x40, /* wMaxPacketSize: 64 */ 0x40, /* wMaxPacketSize: 64 */
0x00, 0x00,
0x00, /* bInterval: ignore for Bulk transfer */ 0x00, /* bInterval: ignore for Bulk transfer */
}; };
#if 0
/*Header Functional Descriptor*/
0x05, /* bLength: Endpoint Descriptor size */
0x24, /* bDescriptorType: CS_INTERFACE */
0x00, /* bDescriptorSubtype: Header Func Desc */
0x10, /* bcdCDC: spec release number */
0x01,
/*Call Management Functional Descriptor*/
0x05, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x01, /* bDescriptorSubtype: Call Management Func Desc */
0x00, /* bmCapabilities: D0+D1 */
0x01, /* bDataInterface: 1 */
/*ACM Functional Descriptor*/
0x04, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x02, /* bDescriptorSubtype: Abstract Control Management desc */
0x02, /* bmCapabilities */
#endif
const uint8_t USB_StringLangDescriptor[] = { const uint8_t USB_StringLangDescriptor[] = {
STRING_LANG_DESCRIPTOR_SIZE_BYTE, //bLength STRING_LANG_DESCRIPTOR_SIZE_BYTE, // bLength
0x03, //bDescriptorType 0x03, // bDescriptorType
0x09, //wLANGID_L 0x09, // wLANGID_L
0x04 //wLANGID_H 0x04 // wLANGID_H
}; };
#define _USB_STRING_(name, str) \ // these descriptors are not used in PL2303 emulator!
const struct name \
{ \
uint8_t bLength; \
uint8_t bDescriptorType; \
wchar_t bString[(sizeof(str) - 2) / 2]; \
\
} \
name = {sizeof(name), 0x03, str};
_USB_STRING_(USB_StringSerialDescriptor, L"0.01") _USB_STRING_(USB_StringSerialDescriptor, L"0.01")
_USB_STRING_(USB_StringManufacturingDescriptor, L"Russia, SAO RAS") _USB_STRING_(USB_StringManufacturingDescriptor, L"Russia, SAO RAS")
_USB_STRING_(USB_StringProdDescriptor, L"TSYS01 sensors controller") _USB_STRING_(USB_StringProdDescriptor, L"TSYS01 sensors controller")
usb_dev_t USB_Dev; static usb_dev_t USB_Dev;
ep_t endpoints[MAX_ENDPOINTS]; static ep_t endpoints[MAX_ENDPOINTS];
static void EP_Readx(uint8_t number, uint8_t *buf){ /*
uint32_t timeout = 100000; * default handlers
uint16_t status, i; */
status = USB -> EPnR[number]; // SET_LINE_CODING
status = SET_VALID_RX(status); void WEAK linecoding_handler(__attribute__((unused)) usb_LineCoding *lc){
status = SET_NAK_TX(status); #ifdef EBUG
status = KEEP_DTOG_TX(status); SEND("Want baudrate: "); printu(lc->dwDTERate);
status = KEEP_DTOG_RX(status); SEND(", charFormat: "); printu(lc->bCharFormat);
USB -> EPnR[number] = status; SEND(", parityType: "); printu(lc->bParityType);
endpoints[number].rx_flag = 0; SEND(", dataBits: "); printu(lc->bDataBits);
while (!endpoints[number].rx_flag){ usart_putchar('\n');
if (timeout) timeout--; #endif
else break; setlinecoding = 1;
} }
for (i = 0; i < endpoints[number].rx_cnt; i++){
buf[i] = endpoints[number].rx_buf[i]; // SET_CONTROL_LINE_STATE
void WEAK clstate_handler(__attribute__((unused)) uint16_t val){
#ifdef EBUG
SEND("change state to ");
printu(val);
usart_putchar('\n');
#endif
}
// SEND_BREAK
void WEAK break_handler(){
MSG("Break\n");
}
// handler of vendor requests
void WEAK vendor_handler(config_pack_t *packet){
if(packet->bmRequestType & 0x80){ // read
uint8_t c = '?';
EP_WriteIRQ(0, &c, 1);
}else{ // write ZLP
EP_WriteIRQ(0, (uint8_t *)0, 0);
} }
} }
@ -183,21 +192,25 @@ bmRequestType: 76543210
* @param ep - endpoint state * @param ep - endpoint state
* @return data written to EP0R * @return data written to EP0R
*/ */
uint16_t Enumerate_Handler(ep_t ep){ uint16_t EP0_Handler(ep_t ep){
config_pack_t *packet = (config_pack_t *)ep.rx_buf;
uint16_t status = 0; // bus powered uint16_t status = 0; // bus powered
uint16_t epstatus = ep.status; // EP0R on input -> return this value after modifications
static uint8_t configuration = 0; // reply for GET_CONFIGURATION (==1 if configured)
void wr0(const uint8_t *buf, uint16_t size){ void wr0(const uint8_t *buf, uint16_t size){
if(packet->wLength < size) size = packet->wLength; if(setup_packet.wLength < size) size = setup_packet.wLength;
EP_WriteIRQ(0, buf, size); EP_WriteIRQ(0, buf, size);
} }
#ifdef EBUG
uint8_t _2wr = 0; uint8_t _2wr = 0;
#define WRITEDUMP(str) do{MSG(str); _2wr = 1;}while(0)
#else
#define WRITEDUMP(str)
#endif
if ((ep.rx_flag) && (ep.setup_flag)){ if ((ep.rx_flag) && (ep.setup_flag)){
if (packet -> bmRequestType == 0x80){ // standard device request (device to host) if (setup_packet.bmRequestType == 0x80){ // standard device request (device to host)
switch(packet->bRequest){ switch(setup_packet.bRequest){
case GET_DESCRIPTOR: case GET_DESCRIPTOR:
switch(packet->wValue){ switch(setup_packet.wValue){
case DEVICE_DESCRIPTOR: case DEVICE_DESCRIPTOR:
wr0(USB_DeviceDescriptor, sizeof(USB_DeviceDescriptor)); wr0(USB_DeviceDescriptor, sizeof(USB_DeviceDescriptor));
break; break;
@ -220,290 +233,250 @@ uint8_t _2wr = 0;
wr0(USB_DeviceQualifierDescriptor, DEVICE_QALIFIER_SIZE_BYTE); wr0(USB_DeviceQualifierDescriptor, DEVICE_QALIFIER_SIZE_BYTE);
break; break;
default: default:
SEND("UNK_DES"); WRITEDUMP("UNK_DES");
_2wr = 1;
break; break;
} }
break; break;
case GET_STATUS: case GET_STATUS:
EP_WriteIRQ(0, (uint8_t *)&status, 2); // send status: Bus Powered EP_WriteIRQ(0, (uint8_t *)&status, 2); // send status: Bus Powered
break; break;
case GET_CONFIGURATION:
WRITEDUMP("GET_CONFIGURATION");
EP_WriteIRQ(0, &configuration, 1);
break;
default: default:
SEND("80:WR_REQ"); WRITEDUMP("80:WR_REQ");
_2wr = 1;
break; break;
} }
//ôÁË ËÁË ÍÙ ÎÅ ÏÖÉÄÁÅÍ ÐÒÉÅÍÁ É ÚÁÎÉÍÁÅÍÓÑ ÔÏÌØËÏ ÐÅÒÅÄÁÞÅÊ, ÔÏ ÕÓÔÁÎÁ×ÌÉ×ÁÅÍ epstatus = SET_NAK_RX(epstatus);
ep.status = SET_NAK_RX(ep.status); epstatus = SET_VALID_TX(epstatus);
ep.status = SET_VALID_TX(ep.status); }else if(setup_packet.bmRequestType == 0x00){ // standard device request (host to device)
}else if(packet->bmRequestType == 0x00){ // standard device request (host to device) switch(setup_packet.bRequest){
switch(packet->bRequest){
case SET_ADDRESS: case SET_ADDRESS:
//óÒÁÚÕ ÐÒÉÓ×ÏÉÔØ ÁÄÒÅÓ × DADDR ÎÅÌØÚÑ, ÔÁË ËÁË ÈÏÓÔ ÏÖÉÄÁÅÔ ÐÏÄÔ×ÅÒÖÄÅÎÉÑ // new address will be assigned later - after acknowlegement or request to host
//ÐÒÉÅÍÁ ÓÏ ÓÔÁÒÙÍ ÁÄÒÅÓÏÍ USB_Dev.USB_Addr = setup_packet.wValue;
USB_Dev.USB_Addr = packet -> wValue;
break; break;
case SET_CONFIGURATION: case SET_CONFIGURATION:
//õÓÔÁÎÁ×ÌÉ×ÁÅÍ ÓÏÓÔÏÑÎÉÅ × "óËÏÎÆÉÇÕÒÉÒÏ×ÁÎÏ" // Now device configured
USB_Dev.USB_Status = USB_CONFIGURE_STATE; USB_Dev.USB_Status = USB_CONFIGURE_STATE;
configuration = setup_packet.wValue;
break; break;
default: default:
SEND("0:WR_REQ"); WRITEDUMP("0:WR_REQ");
_2wr = 1;
break; break;
} }
//ÏÔÐÒÁ×ÌÑÅÍ ÐÏÄÔ×ÅÒÖÄÅÎÉÅ ÐÒÉÅÍÁ // send ZLP
EP_WriteIRQ(0, (uint8_t *)0, 0); EP_WriteIRQ(0, (uint8_t *)0, 0);
//ôÁË ËÁË ÍÙ ÎÅ ÏÖÉÄÁÅÍ ÐÒÉÅÍÁ É ÚÁÎÉÍÁÅÍÓÑ ÔÏÌØËÏ ÐÅÒÅÄÁÞÅÊ, ÔÏ ÕÓÔÁÎÁ×ÌÉ×ÁÅÍ epstatus = SET_NAK_RX(epstatus);
ep.status = SET_NAK_RX(ep.status); epstatus = SET_VALID_TX(epstatus);
ep.status = SET_VALID_TX(ep.status); }else if(setup_packet.bmRequestType == 0x02){ // standard endpoint request (host to device)
}else if(packet -> bmRequestType == 0x02){ // standard endpoint request (host to device) if (setup_packet.bRequest == CLEAR_FEATURE){
if (packet->bRequest == CLEAR_FEATURE){ // send ZLP
//ÏÔÐÒÁ×ÌÑÅÍ ÐÏÄÔ×ÅÒÖÄÅÎÉÅ ÐÒÉÅÍÁ
EP_WriteIRQ(0, (uint8_t *)0, 0); EP_WriteIRQ(0, (uint8_t *)0, 0);
//ôÁË ËÁË ÍÙ ÎÅ ÏÖÉÄÁÅÍ ÐÒÉÅÍÁ É ÚÁÎÉÍÁÅÍÓÑ ÔÏÌØËÏ ÐÅÒÅÄÁÞÅÊ, ÔÏ ÕÓÔÁÎÁ×ÌÉ×ÁÅÍ epstatus = SET_NAK_RX(epstatus);
ep.status = SET_NAK_RX(ep.status); epstatus = SET_VALID_TX(epstatus);
ep.status = SET_VALID_TX(ep.status);
}else{ }else{
SEND("02:WR_REQ"); WRITEDUMP("02:WR_REQ");
_2wr = 1;
} }
}else if((packet->bmRequestType & VENDOR_MASK_REQUEST) == VENDOR_MASK_REQUEST){ // vendor request }else if((setup_packet.bmRequestType & VENDOR_MASK_REQUEST) == VENDOR_MASK_REQUEST){ // vendor request
SEND("vendor "); vendor_handler(&setup_packet);
if(packet->bmRequestType & 0x80){ // read WRITEDUMP("VENDOR");
SEND("read: "); epstatus = SET_NAK_RX(epstatus);
uint8_t c = '?'; epstatus = SET_VALID_TX(epstatus);
EP_WriteIRQ(0, &c, 1); }else if((setup_packet.bmRequestType & 0x7f) == CONTROL_REQUEST_TYPE){ // control request
}else{ // write switch(setup_packet.bRequest){
SEND("write: ");
EP_WriteIRQ(0, (uint8_t *)0, 0);
}
printuhex(packet->wValue);
_2wr = 1;
ep.status = SET_NAK_RX(ep.status);
ep.status = SET_VALID_TX(ep.status);
}else if((packet->bmRequestType & 0x7f) == CONTROL_REQUEST_TYPE){ // control request
_2wr = 1;
//usb_LineCoding c;
//uint8_t lbuf[10];
//usb_cdc_notification *notif = (usb_cdc_notification*) lbuf;
switch(packet->bRequest){
case GET_LINE_CODING: case GET_LINE_CODING:
SEND("GET_LINE_CODING");
EP_WriteIRQ(0, (uint8_t*)&lineCoding, sizeof(lineCoding)); EP_WriteIRQ(0, (uint8_t*)&lineCoding, sizeof(lineCoding));
break; break;
case SET_LINE_CODING: case SET_LINE_CODING:
SEND("SET_LINE_CODING");
EP_Readx(0, (uint8_t*)&lineCoding);
printuhex(lineCoding.dwDTERate);
//EP_WriteIRQ(0, (uint8_t*)&lineCoding, sizeof(lineCoding));
//memcpy(&c, endpoints[0].rx_buf, sizeof(usb_LineCoding));
/*SEND("len: ");
printu(endpoints[0].rx_cnt);
printu(endpoints[0].rx_buf[6]);
SEND(", want baudrate: "); printuhex(c.dwDTERate);
SEND(", charFormat: "); printu(c.bCharFormat);
SEND(", parityType: "); printu(c.bParityType);
SEND(", dataBits: "); printu(c.bDataBits);*/
break; break;
case SET_CONTROL_LINE_STATE: case SET_CONTROL_LINE_STATE:
SEND("SET_CONTROL_LINE_STATE"); clstate_handler(setup_packet.wValue);
/*
* This Linux cdc_acm driver requires this to be implemented
* even though it's optional in the CDC spec, and we don't
* advertise it in the ACM functional descriptor.
*/
/* We echo signals back to host as notification. *
notif->bmRequestType = CONTROL_REQUEST_TYPE | 0x80;
notif->bNotificationType = SET_LINE_CODING;
notif->wValue = 0;
notif->wIndex = 0;
notif->wLength = 2;
lbuf[8] = packet->wValue & 3;
lbuf[9] = 0;
EP_WriteIRQ(3, lbuf, 10);*/
//EP_WriteIRQ(0, (uint8_t *)0, 0);
break; break;
case SEND_BREAK: case SEND_BREAK:
SEND("SEND_BREAK"); break_handler();
break; break;
default: default:
SEND("undef control req"); WRITEDUMP("undef control req");
} }
if((packet->bmRequestType & 0x80) == 0) EP_WriteIRQ(0, (uint8_t *)0, 0); // write acknowledgement if((setup_packet.bmRequestType & 0x80) == 0) EP_WriteIRQ(0, (uint8_t *)0, 0); // write acknowledgement
ep.status = SET_NAK_RX(ep.status); epstatus = SET_VALID_RX(epstatus);
ep.status = SET_VALID_TX(ep.status); epstatus = SET_VALID_TX(epstatus);
} }
} else if (ep.rx_flag){ //ðÏÄÔ×ÅÒÖÅÎÉÅ ÐÒÉÅÍÁ ÈÏÓÔÏÍ }else if (ep.rx_flag){ // got data over EP0 or host acknowlegement
//ôÁË ËÁË ÐÏÔ×ÅÒÖÄÅÎÉÅ ÏÔ ÈÏÓÔÁ ÚÁ×ÅÒÛÁÅÔ ÔÒÁÎÚÁËÃÉÀ if(ep.rx_cnt){
//ÔÏ ÓÂÒÁÓÙ×ÁÅÍ DTOGÉ if(setup_packet.bRequest == SET_LINE_CODING){
ep.status = CLEAR_DTOG_RX(ep.status); WRITEDUMP("SET_LINE_CODING");
ep.status = CLEAR_DTOG_TX(ep.status); linecoding_handler((usb_LineCoding*)ep0databuf);
//ôÁË ËÁË ÍÙ ÏÖÉÄÁÅÍ ÎÏ×ÙÊ ÚÁÐÒÏÓ ÏÔ ÈÏÓÔÁ, ÕÓÔÁÎÁ×ÌÉ×ÁÅÍ }
ep.status = SET_VALID_RX(ep.status); EP_WriteIRQ(0, (uint8_t *)0, 0);
ep.status = SET_STALL_TX(ep.status); }
} else if (ep.tx_flag){ //õÓÐÅÛÎÁÑ ÐÅÒÅÄÁÞÁ ÐÁËÅÔÁ // Close transaction
//åÓÌÉ ÐÏÌÕÞÅÎÎÙÊ ÏÔ ÈÏÓÔÁ ÁÄÒÅÓ ÎÅ ÓÏ×ÐÁÄÁÅÔ Ó ÁÄÒÅÓÏÍ ÕÓÔÒÏÊÓÔ×Á epstatus = CLEAR_DTOG_RX(epstatus);
if ((USB -> DADDR & USB_DADDR_ADD) != USB_Dev.USB_Addr){ epstatus = CLEAR_DTOG_TX(epstatus);
//ðÒÉÓ×ÁÉ×ÁÅÍ ÎÏ×ÙÊ ÁÄÒÅÓ ÕÓÔÒÏÊÓÔ×Õ // wait for new data from host
USB -> DADDR = USB_DADDR_EF | USB_Dev.USB_Addr; epstatus = SET_VALID_RX(epstatus);
//õÓÔÁÎÁ×ÌÉ×ÁÅÍ ÓÏÓÔÏÑÎÉÅ × "áÄÒÅÓÏ×ÁÎÎÏ" epstatus = SET_STALL_TX(epstatus);
} else if (ep.tx_flag){ // package transmitted
// now we can change address after enumeration
if ((USB->DADDR & USB_DADDR_ADD) != USB_Dev.USB_Addr){
USB->DADDR = USB_DADDR_EF | USB_Dev.USB_Addr;
// change state to ADRESSED
USB_Dev.USB_Status = USB_ADRESSED_STATE; USB_Dev.USB_Status = USB_ADRESSED_STATE;
} }
//ëÏÎÅà ÔÒÁÎÚÁËÃÉÉ, ÏÞÉÝÁÅÍ DTOG // end of transaction
ep.status = CLEAR_DTOG_RX(ep.status); epstatus = CLEAR_DTOG_RX(epstatus);
ep.status = CLEAR_DTOG_TX(ep.status); epstatus = CLEAR_DTOG_TX(epstatus);
//ïÖÉÄÁÅÍ ÎÏ×ÙÊ ÚÁÐÒÏÓ, ÉÌÉ ÐÏ×ÔÏÒÎÏÅ ÞÔÅÎÉÅ ÄÁÎÎÙÈ (ÏÛÉÂËÁ ÐÒÉ ÐÅÒÅÄÁÞÅ) epstatus = SET_VALID_RX(epstatus);
//ÐÏÜÔÏÍÕ Rx É Tx × VALID epstatus = SET_VALID_TX(epstatus);
ep.status = SET_VALID_RX(ep.status);
ep.status = SET_VALID_TX(ep.status);
} }
if(_2wr){ #ifdef EBUG
usart_putchar(' '); if(_2wr){
if (ep.rx_flag) usart_putchar('r'); usart_putchar(' ');
else usart_putchar('t'); if (ep.rx_flag) usart_putchar('r');
printu(packet->wLength); else usart_putchar('t');
if(ep.setup_flag) usart_putchar('s'); printu(setup_packet.wLength);
usart_putchar(' '); if(ep.setup_flag) usart_putchar('s');
usart_putchar('R'); usart_putchar(' ');
printu(packet->bRequest); usart_putchar('I');
usart_putchar('V'); printu(setup_packet.wIndex);
printu(packet->wValue); usart_putchar('V');
usart_putchar('T'); printu(setup_packet.wValue);
printu(packet->bmRequestType); usart_putchar('R');
usart_putchar('\n'); printu(setup_packet.bRequest);
} usart_putchar('T');
//ÚÎÁÞÅÎÉÅ ep.status ÂÕÄÅÔ ÚÁÐÉÓÁÎÏ × EPnR É ÓÏÏÔ×ÅÔ×Ó×ÅÎÎÏ ÓÂÒÏÛÅÎÙ ÉÌÉ ÕÓÔÁÎÏ×ÌÅÎÙ printu(setup_packet.bmRequestType);
//ÓÏÏÔ×ÅÔÓ×ÕÀÝÉÅ ÂÉÔÙ usart_putchar(' ');
return ep.status; usart_putchar('0' + ep0dbuflen);
usart_putchar(' ');
hexdump(ep0databuf, ep0dbuflen);
usart_putchar('\n');
}
#endif
return epstatus;
} }
/* /**
* éÎÉÃÉÁÌÉÚÁÃÉÑ ËÏÎÅÞÎÏÊ ÔÏÞËÉ * Endpoint initialisation, size of input buffer fixed to 64 bytes
* number - ÎÏÍÅÒ (0...7) * @param number - EP num (0...7)
* type - ÔÉÐ ËÏÎÅÞÎÏÊ ÔÏÞËÉ (EP_TYPE_BULK, EP_TYPE_CONTROL, EP_TYPE_ISO, EP_TYPE_INTERRUPT) * @param type - EP type (EP_TYPE_BULK, EP_TYPE_CONTROL, EP_TYPE_ISO, EP_TYPE_INTERRUPT)
* addr_tx - ÁÄÒÅÓ ÐÅÒÅÄÁÀÝÅÇÏ ÂÕÆÅÒÁ × ÐÅÒÉÆÅÒÉÉ USB * @param addr_tx - transmission buffer address @ USB/CAN buffer
* addr_rx - ÁÄÒÅÓ ÐÒÉÅÍÎÏÇÏ ÂÕÆÅÒÁ × ÐÅÒÉÆÅÒÉÉ USB * @param addr_rx - reception buffer address @ USB/CAN buffer
* òÁÚÍÅÒ ÐÒÉÅÍÎÏÇÏ ÂÕÆÅÒÁ - ÆÉËÓÉÒÏ×ÁÎÎÙÊ 64 ÂÁÊÔÁ * @param uint16_t (*func)(ep_t *ep) - EP handler function
* uint16_t (*func)(ep_t *ep) - ÁÄÒÅÓ ÆÕÎËÃÉÉ ÏÂÒÁÂÏÔÞÉËÁ ÓÏÂÙÔÉÊ ËÏÎÔÒÏÌØÎÏÊ ÔÏÞËÉ (ÐÒÅÒÙ×ÁÎÉÑ)
*/ */
void EP_Init(uint8_t number, uint8_t type, uint16_t addr_tx, uint16_t addr_rx, uint16_t (*func)(ep_t ep)){ void EP_Init(uint8_t number, uint8_t type, uint16_t addr_tx, uint16_t addr_rx, uint16_t (*func)(ep_t ep)){
USB -> EPnR[number] = (type << 9) | (number & USB_EPnR_EA); USB->EPnR[number] = (type << 9) | (number & USB_EPnR_EA);
USB -> EPnR[number] ^= USB_EPnR_STAT_RX | USB_EPnR_STAT_TX_1; USB->EPnR[number] ^= USB_EPnR_STAT_RX | USB_EPnR_STAT_TX_1;
USB_BTABLE -> EP[number].USB_ADDR_TX = addr_tx; USB_BTABLE->EP[number].USB_ADDR_TX = addr_tx;
USB_BTABLE -> EP[number].USB_COUNT_TX = 0; USB_BTABLE->EP[number].USB_COUNT_TX = 0;
USB_BTABLE -> EP[number].USB_ADDR_RX = addr_rx; USB_BTABLE->EP[number].USB_ADDR_RX = addr_rx;
USB_BTABLE -> EP[number].USB_COUNT_RX = 0x8400; // buffer size (64 bytes): Table127 of RM: BL_SIZE=1, NUM_BLOCK=1 USB_BTABLE->EP[number].USB_COUNT_RX = 0x8400; // buffer size (64 bytes): Table127 of RM: BL_SIZE=1, NUM_BLOCK=1
endpoints[number].func = func; endpoints[number].func = func;
endpoints[number].tx_buf = (uint16_t *)(USB_BTABLE_BASE + addr_tx); endpoints[number].tx_buf = (uint16_t *)(USB_BTABLE_BASE + addr_tx);
endpoints[number].rx_buf = (uint8_t *)(USB_BTABLE_BASE + addr_rx); endpoints[number].rx_buf = (uint8_t *)(USB_BTABLE_BASE + addr_rx);
} }
//ïÂÒÁÂÏÔÞÉË ÐÒÅÒÙ×ÁÎÉÊ USB // standard IRQ handler
void usb_isr(){ void usb_isr(){
uint8_t n; uint8_t n;
if (USB -> ISTR & USB_ISTR_RESET){ if (USB->ISTR & USB_ISTR_RESET){
// Reinit registers // Reinit registers
USB -> CNTR = USB_CNTR_RESETM | USB_CNTR_CTRM; USB->CNTR = USB_CNTR_RESETM | USB_CNTR_CTRM;
USB -> ISTR = 0; USB->ISTR = 0;
// Endpoint 0 - CONTROL (128 bytes for TX and 64 for RX) // Endpoint 0 - CONTROL
EP_Init(0, EP_TYPE_CONTROL, 64, 192, Enumerate_Handler); EP_Init(0, EP_TYPE_CONTROL, 64, 128, EP0_Handler);
//ïÂÎÕÌÑÅÍ ÁÄÒÅÓ ÕÓÔÒÏÊÓÔ×Á // clear address, leave only enable bit
USB -> DADDR = USB_DADDR_EF; USB->DADDR = USB_DADDR_EF;
//ðÒÉÓ×ÁÉ×ÁÅÍ ÓÏÓÔÏÑÎÉÅ × DEFAULT (ÏÖÉÄÁÎÉÅ ÜÎÕÍÅÒÁÃÉÉ) // state is default - wait for enumeration
USB_Dev.USB_Status = USB_DEFAULT_STATE; USB_Dev.USB_Status = USB_DEFAULT_STATE;
} }
if (USB -> ISTR & USB_ISTR_CTR){ while(USB->ISTR & USB_ISTR_CTR){
//ïÐÒÅÄÅÌÑÅÍ ÎÏÍÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ, ×ÙÚ×Á×ÛÅÊ ÐÒÅÒÙ×ÁÎÉÅ // EP number
n = USB -> ISTR & USB_ISTR_EPID; n = USB->ISTR & USB_ISTR_EPID;
//ëÏÐÉÒÕÅÍ ËÏÌÉÞÅÓÔ×Ï ÐÒÉÎÑÔÙÈ ÂÁÊÔ // copy status register
endpoints[n].rx_cnt = USB_BTABLE -> EP[n].USB_COUNT_RX; uint16_t epstatus = USB->EPnR[n];
//ëÏÐÉÒÕÅÍ ÓÏÄÅÒÖÉÍÏÅ EPnR ÜÔÏÊ ËÏÎÅÞÎÏÊ ÔÏÞËÉ // Calculate flags
endpoints[n].status = USB -> EPnR[n]; endpoints[n].rx_flag = (epstatus & USB_EPnR_CTR_RX) ? 1 : 0;
//óÂÒÁÓÙ×ÁÅÍ ÆÌÁÖËÉ endpoints[n].setup_flag = (epstatus & USB_EPnR_SETUP) ? 1 : 0;
endpoints[n].rx_flag = 0; endpoints[n].tx_flag = (epstatus & USB_EPnR_CTR_TX) ? 1 : 0;
endpoints[n].tx_flag = 0; // copy received bytes amount
endpoints[n].setup_flag = 0; endpoints[n].rx_cnt = USB_BTABLE->EP[n].USB_COUNT_RX;
//õÓÔÁÎÁ×ÌÉ×ÁÅÍ ÎÕÖÎÙÅ ÆÌÁÖËÉ // check direction
if (endpoints[n].status & USB_EPnR_CTR_RX) endpoints[n].rx_flag = 1; if(USB->ISTR & USB_ISTR_DIR){ // OUT interrupt - receive data, CTR_RX==1 (if CTR_TX == 1 - two pending transactions: receive following by transmit)
if (endpoints[n].status & USB_EPnR_SETUP) endpoints[n].setup_flag = 1; if(n == 0){ // control endpoint
if (endpoints[n].status & USB_EPnR_CTR_TX) endpoints[n].tx_flag = 1; if(epstatus & USB_EPnR_SETUP){ // setup packet -> copy data to conf_pack
//÷ÙÚÙ×ÁÅÍ ÆÕÎËÃÉÀ-ÏÂÒÁÂÏÔÞÉË ÓÏÂÙÔÉÑ ËÏÎÅÞÎÏÊ ÔÏÞËÉ memcpy(&setup_packet, endpoints[0].rx_buf, sizeof(setup_packet));
//Ó ÐÏÓÌÅÄÕÀÝÅÊ ÚÁÐÉÓØÀ × ÒÅÇÉÓÔÒ EPnR ÒÅÚÕÌØÔÁÔÁ ep0dbuflen = 0;
endpoints[n].status = endpoints[n].func(endpoints[n]); // interrupt handler will be called later
//îÅ ÍÅÎÑÅÍ ÓÏÓÔÏÑÎÉÅ DTOG }else if(epstatus & USB_EPnR_CTR_RX){ // data packet -> push received data to ep0databuf
endpoints[n].status = KEEP_DTOG_TX(endpoints[n].status); ep0dbuflen = endpoints[0].rx_cnt;
endpoints[n].status = KEEP_DTOG_RX(endpoints[n].status); memcpy(ep0databuf, endpoints[0].rx_buf, ep0dbuflen);
//ïÞÉÝÁÅÍ ÆÌÁÇÉ ÐÒÉÅÍÁ É ÐÅÒÅÄÁÞÉ }
endpoints[n].status = CLEAR_CTR_RX(endpoints[n].status); }
endpoints[n].status = CLEAR_CTR_TX(endpoints[n].status); }else{ // IN interrupt - transmit data, only CTR_TX == 1
USB -> EPnR[n] = endpoints[n].status; // enumeration end could be here (if EP0)
}
// prepare status field for EP handler
endpoints[n].status = epstatus;
// call EP handler (even if it will change EPnR, it should return new status)
epstatus = endpoints[n].func(endpoints[n]);
// keep DTOG state
epstatus = KEEP_DTOG_TX(epstatus);
epstatus = KEEP_DTOG_RX(epstatus);
// clear all RX/TX flags
epstatus = CLEAR_CTR_RX(epstatus);
epstatus = CLEAR_CTR_TX(epstatus);
// refresh EPnR
USB->EPnR[n] = epstatus;
USB_BTABLE->EP[n].USB_COUNT_RX = 0x8400;
} }
} }
/*
* æÕÎËÃÉÑ ÚÁÐÉÓÉ ÍÁÓÓÉ×Á × ÂÕÆÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ (÷ùúï÷ éú ðòåòù÷áîéñ) /**
* number - ÎÏÍÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ * Write data to EP buffer (called from IRQ handler)
* *buf - ÁÄÒÅÓ ÍÁÓÓÉ×Á Ó ÚÁÐÉÓÙ×ÁÅÍÙÍÉ ÄÁÎÎÙÍÉ * @param number - EP number
* size - ÒÁÚÍÅÒ ÍÁÓÓÉ×Á * @param *buf - array with data
* @param size - its size
*/ */
void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size){ void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size){
uint8_t i; uint8_t i;
/* uint16_t N2 = (size + 1) >> 1;
* ÷îéíáîéå ëïóôùìø // the buffer is 16-bit, so we should copy data as it would be uint16_t
* éÚ-ÚÁ ÏÛÉÂËÉ ÚÁÐÉÓÉ × ÏÂÌÁÓÔØ USB/CAN SRAM Ó 8-ÂÉÔÎÙÍ ÄÏÓÔÕÐÏÍ
* ÐÒÉÛÌÏÓØ ÕÐÁËÏ×Ù×ÁÔØ ÍÁÓÓÉ× × 16-ÂÉÔ, ÓÏÏÂ×ÅÔÓÔ×ÅÎÎÏ ÒÁÚÍÅÒ ÄÅÌÉÔØ
* ÎÁ 2, ÅÓÌÉ ÏÎ ÂÙÌ ÞÅÔÎÙÊ, ÉÌÉ ÄÅÌÉÔØ ÎÁ 2 + 1 ÅÓÌÉ ÎÅÞÅÔÎÙÊ
*/
uint16_t temp = (size & 0x0001) ? (size + 1) / 2 : size / 2;
uint16_t *buf16 = (uint16_t *)buf; uint16_t *buf16 = (uint16_t *)buf;
for (i = 0; i < temp; i++){ for (i = 0; i < N2; i++){
endpoints[number].tx_buf[i] = buf16[i]; endpoints[number].tx_buf[i] = buf16[i];
} }
//ëÏÌÉÞÅÓÔ×Ï ÐÅÒÅÄÁ×ÁÅÍÙÈ ÂÁÊÔ USB_BTABLE->EP[number].USB_COUNT_TX = size;
USB_BTABLE -> EP[number].USB_COUNT_TX = size;
} }
/*
* æÕÎËÃÉÑ ÚÁÐÉÓÉ ÍÁÓÓÉ×Á × ÂÕÆÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ (÷ùúï÷ éú÷îå ðòåòù÷áîéñ) /**
* number - ÎÏÍÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ * Write data to EP buffer (called outside IRQ handler)
* *buf - ÁÄÒÅÓ ÍÁÓÓÉ×Á Ó ÚÁÐÉÓÙ×ÁÅÍÙÍÉ ÄÁÎÎÙÍÉ * @param number - EP number
* size - ÒÁÚÍÅÒ ÍÁÓÓÉ×Á * @param *buf - array with data
* @param size - its size
*/ */
void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size){ void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size){
uint8_t i; uint16_t status = USB->EPnR[number];
uint16_t status = USB -> EPnR[number]; EP_WriteIRQ(number, buf, size);
/* status = SET_NAK_RX(status);
* ÷îéíáîéå ëïóôùìø status = SET_VALID_TX(status);
* éÚ-ÚÁ ÏÛÉÂËÉ ÚÁÐÉÓÉ × ÏÂÌÁÓÔØ USB/CAN SRAM Ó 8-ÂÉÔÎÙÍ ÄÏÓÔÕÐÏÍ
* ÐÒÉÛÌÏÓØ ÕÐÁËÏ×Ù×ÁÔØ ÍÁÓÓÉ× × 16-ÂÉÔ, ÓÏÏÂ×ÅÔÓÔ×ÅÎÎÏ ÒÁÚÍÅÒ ÄÅÌÉÔØ
* ÎÁ 2, ÅÓÌÉ ÏÎ ÂÙÌ ÞÅÔÎÙÊ, ÉÌÉ ÄÅÌÉÔØ ÎÁ 2 + 1 ÅÓÌÉ ÎÅÞÅÔÎÙÊ
*/
uint16_t temp = (size & 0x0001) ? (size + 1) / 2 : size / 2;
uint16_t *buf16 = (uint16_t *)buf;
for (i = 0; i < temp; i++){
endpoints[number].tx_buf[i] = buf16[i];
}
//ëÏÌÉÞÅÓÔ×Ï ÐÅÒÅÄÁ×ÁÅÍÙÈ ÂÁÊÔ
USB_BTABLE -> EP[number].USB_COUNT_TX = size;
status = SET_NAK_RX(status); //RX × NAK
status = SET_VALID_TX(status); //TX × VALID
status = KEEP_DTOG_TX(status); status = KEEP_DTOG_TX(status);
status = KEEP_DTOG_RX(status); status = KEEP_DTOG_RX(status);
USB -> EPnR[number] = status; USB->EPnR[number] = status;
} }
/* /*
* æÕÎËÃÉÑ ÞÔÅÎÉÑ ÍÁÓÓÉ×Á ÉÚ ÂÕÆÅÒÁ ËÏÎÅÞÎÏÊ ÔÏÞËÉ * Copy data from EP buffer into user buffer area
* number - ÎÏÍÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ * @param *buf - user array for data
* *buf - ÁÄÒÅÓ ÍÁÓÓÉ×Á ËÕÄÁ ÓÞÉÔÙ×ÁÅÍ ÄÁÎÎÙÅ * @return amount of data read
*/ */
void EP_Read(uint8_t number, uint8_t *buf){ int EP_Read(uint8_t number, uint8_t *buf){
uint16_t i; int i = endpoints[number].rx_cnt;
for (i = 0; i < endpoints[number].rx_cnt; i++){ if(i) memcpy(buf, endpoints[number].rx_buf, i);
buf[i] = endpoints[number].rx_buf[i]; return i;
}
} }
//æÕÎËÃÉÑ ÐÏÌÕÞÅÎÉÑ ÓÏÓÔÏÑÎÉÑ ÓÏÅÄÉÎÅÎÉÑ USB
// USB status
uint8_t USB_GetState(){ uint8_t USB_GetState(){
return USB_Dev.USB_Status; return USB_Dev.USB_Status;
} }

View File

@ -1,27 +1,51 @@
/*
* geany_encoding=koi8-r
* usb_lib.h
*
* Copyright 2018 Edward V. Emelianov <eddy@sao.ru, edward.emelianoff@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
#pragma once #pragma once
#ifndef __USB_LIB_H__ #ifndef __USB_LIB_H__
#define __USB_LIB_H__ #define __USB_LIB_H__
#include <wchar.h>
#include "usb_defs.h" #include "usb_defs.h"
//íÁËÓÉÍÁÌØÎÏÅ ËÏÌÉÞÅÓ×Ï ËÏÎÅÞÎÙÈ ÔÏÞÅË // Max EP amount (EP0 + other used)
#define MAX_ENDPOINTS 4 #define MAX_ENDPOINTS 4
// bRequest, standard; for bmRequestType == 0x80 // bRequest, standard; for bmRequestType == 0x80
#define GET_STATUS 0x00 #define GET_STATUS 0x00
#define GET_DESCRIPTOR 0x06 #define GET_DESCRIPTOR 0x06
#define GET_CONFIGURATION 0x08 //ÎÅ ÒÅÁÌÉÚÏ×ÁÎ #define GET_CONFIGURATION 0x08
// for bmRequestType == 0 // for bmRequestType == 0
#define CLEAR_FEATURE 0x01 #define CLEAR_FEATURE 0x01
#define SET_FEATURE 0x03 //ÎÅ ÒÅÁÌÉÚÏ×ÁÎ #define SET_FEATURE 0x03 // unused
#define SET_ADDRESS 0x05 #define SET_ADDRESS 0x05
#define SET_DESCRIPTOR 0x07 //ÎÅ ÒÅÁÌÉÚÏ×ÁÎ #define SET_DESCRIPTOR 0x07 // unused
#define SET_CONFIGURATION 0x09 #define SET_CONFIGURATION 0x09
// for bmRequestType == 0x81, 1 or 0xB2 // for bmRequestType == 0x81, 1 or 0xB2
#define GET_INTERFACE 0x0A //ÎÅ ÒÅÁÌÉÚÏ×ÁÎ #define GET_INTERFACE 0x0A // unused
#define SET_INTERFACE 0x0B //ÎÅ ÒÅÁÌÉÚÏ×ÁÎ #define SET_INTERFACE 0x0B // unused
#define SYNC_FRAME 0x0C //ÎÅ ÒÅÁÌÉÚÏ×ÁÎ #define SYNC_FRAME 0x0C // unused
// vendor // vendor requests
#define VENDOR_MASK_REQUEST 0x40 #define VENDOR_MASK_REQUEST 0x40
#define VENDOR_READ_REQUEST_TYPE 0xc0 #define VENDOR_READ_REQUEST_TYPE 0xc0
#define VENDOR_WRITE_REQUEST_TYPE 0x40 #define VENDOR_WRITE_REQUEST_TYPE 0x40
@ -30,38 +54,19 @@
#define CONTROL_REQUEST_TYPE 0x21 #define CONTROL_REQUEST_TYPE 0x21
// Class-Specific Control Requests // Class-Specific Control Requests
#define SEND_ENCAPSULATED_COMMAND 0x00 #define SEND_ENCAPSULATED_COMMAND 0x00
#define GET_ENCAPSULATED_RESPONSE 0x01 #define GET_ENCAPSULATED_RESPONSE 0x01
#define SET_COMM_FEATURE 0x02 #define SET_COMM_FEATURE 0x02
#define GET_COMM_FEATURE 0x03 #define GET_COMM_FEATURE 0x03
#define CLEAR_COMM_FEATURE 0x04 #define CLEAR_COMM_FEATURE 0x04
#define SET_LINE_CODING 0x20 #define SET_LINE_CODING 0x20
#define GET_LINE_CODING 0x21 #define GET_LINE_CODING 0x21
#define SET_CONTROL_LINE_STATE 0x22 #define SET_CONTROL_LINE_STATE 0x22
#define SEND_BREAK 0x23 #define SEND_BREAK 0x23
// control line states // control line states
#define CONTROL_DTR 0x01 #define CONTROL_DTR 0x01
#define CONTROL_RTS 0x02 #define CONTROL_RTS 0x02
/* Line Coding Structure from CDC spec 6.2.13
struct usb_cdc_line_coding {
__le32 dwDTERate;
__u8 bCharFormat;
#define USB_CDC_1_STOP_BITS 0
#define USB_CDC_1_5_STOP_BITS 1
#define USB_CDC_2_STOP_BITS 2
__u8 bParityType;
#define USB_CDC_NO_PARITY 0
#define USB_CDC_ODD_PARITY 1
#define USB_CDC_EVEN_PARITY 2
#define USB_CDC_MARK_PARITY 3
#define USB_CDC_SPACE_PARITY 4
__u8 bDataBits;
} __attribute__ ((packed));
*/
// wValue // wValue
#define DEVICE_DESCRIPTOR 0x100 #define DEVICE_DESCRIPTOR 0x100
@ -71,7 +76,8 @@ struct usb_cdc_line_coding {
#define STRING_PROD_DESCRIPTOR 0x302 #define STRING_PROD_DESCRIPTOR 0x302
#define STRING_SN_DESCRIPTOR 0x303 #define STRING_SN_DESCRIPTOR 0x303
#define DEVICE_QALIFIER_DESCRIPTOR 0x600 #define DEVICE_QALIFIER_DESCRIPTOR 0x600
//íÁËÒÏÓÙ ÕÓÔÁÎÏ×ËÉ/ÏÞÉÓÔËÉ ÂÉÔÏ× × EPnR ÒÅÇÉÓÔÒÁÈ
// EPnR bits manipulation
#define CLEAR_DTOG_RX(R) (R & USB_EPnR_DTOG_RX) ? R : (R & (~USB_EPnR_DTOG_RX)) #define CLEAR_DTOG_RX(R) (R & USB_EPnR_DTOG_RX) ? R : (R & (~USB_EPnR_DTOG_RX))
#define SET_DTOG_RX(R) (R & USB_EPnR_DTOG_RX) ? (R & (~USB_EPnR_DTOG_RX)) : R #define SET_DTOG_RX(R) (R & USB_EPnR_DTOG_RX) ? (R & (~USB_EPnR_DTOG_RX)) : R
#define TOGGLE_DTOG_RX(R) (R | USB_EPnR_DTOG_RX) #define TOGGLE_DTOG_RX(R) (R | USB_EPnR_DTOG_RX)
@ -91,17 +97,29 @@ struct usb_cdc_line_coding {
#define CLEAR_CTR_RX(R) (R & (~USB_EPnR_CTR_RX)) #define CLEAR_CTR_RX(R) (R & (~USB_EPnR_CTR_RX))
#define CLEAR_CTR_TX(R) (R & (~USB_EPnR_CTR_TX)) #define CLEAR_CTR_TX(R) (R & (~USB_EPnR_CTR_TX))
#define CLEAR_CTR_RX_TX(R) (R & (~(USB_EPnR_CTR_TX | USB_EPnR_CTR_RX))) #define CLEAR_CTR_RX_TX(R) (R & (~(USB_EPnR_CTR_TX | USB_EPnR_CTR_RX)))
//óÏÓÔÏÑÎÉÑ ÓÏÅÄÉÎÅÎÉÑ USB
// USB state: uninitialized, addressed, ready for use
#define USB_DEFAULT_STATE 0 #define USB_DEFAULT_STATE 0
#define USB_ADRESSED_STATE 1 #define USB_ADRESSED_STATE 1
#define USB_CONFIGURE_STATE 2 #define USB_CONFIGURE_STATE 2
//ôÉÐÙ ËÏÎÅÞÎÙÈ ÔÏÞÅË
// EP types
#define EP_TYPE_BULK 0x00 #define EP_TYPE_BULK 0x00
#define EP_TYPE_CONTROL 0x01 #define EP_TYPE_CONTROL 0x01
#define EP_TYPE_ISO 0x02 #define EP_TYPE_ISO 0x02
#define EP_TYPE_INTERRUPT 0x03 #define EP_TYPE_INTERRUPT 0x03
//ôÉÐ ÄÌÑ ÒÁÓÛÉÆÒÏ×ËÉ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÏÇÏ ÐÁËÅÔÁ #define _USB_STRING_(name, str) \
const struct name \
{ \
uint8_t bLength; \
uint8_t bDescriptorType; \
wchar_t bString[(sizeof(str) - 2) / 2]; \
\
} \
name = {sizeof(name), 0x03, str};
// EP0 configuration packet
typedef struct { typedef struct {
uint8_t bmRequestType; uint8_t bmRequestType;
uint8_t bRequest; uint8_t bRequest;
@ -109,7 +127,8 @@ typedef struct {
uint16_t wIndex; uint16_t wIndex;
uint16_t wLength; uint16_t wLength;
} config_pack_t; } config_pack_t;
//óÔÒÕËÔÕÒÁ ÓÏÓÔÏÑÎÉÊ ËÏÎÅÞÎÙÈ ÔÏÞÅË
// endpoints state
typedef struct __ep_t{ typedef struct __ep_t{
uint16_t *tx_buf; uint16_t *tx_buf;
uint8_t *rx_buf; uint8_t *rx_buf;
@ -120,7 +139,8 @@ typedef struct __ep_t{
unsigned rx_flag : 1; unsigned rx_flag : 1;
unsigned setup_flag : 1; unsigned setup_flag : 1;
} ep_t; } ep_t;
//óÔÁÔÕÓ É ÁÄÒÅÓ ÓÏÅÄÉÎÅÎÉÑ USB
// USB status & its address
typedef struct { typedef struct {
uint8_t USB_Status; uint8_t USB_Status;
uint16_t USB_Addr; uint16_t USB_Addr;
@ -149,17 +169,22 @@ typedef struct {
uint16_t wLength; uint16_t wLength;
} __attribute__ ((packed)) usb_cdc_notification; } __attribute__ ((packed)) usb_cdc_notification;
//éÎÉÃÉÁÌÉÚÁÃÉÑ USB extern uint8_t setlinecoding;
#define SETLINECODING() (setlinecoding)
#define CLRLINECODING() do{setlinecoding = 0;}while(0)
void USB_Init(); void USB_Init();
//ðÏÌÕÞÉÔØ ÓÔÁÔÕÓ ÓÏÅÄÉÎÅÎÉÑ USB
uint8_t USB_GetState(); uint8_t USB_GetState();
//éÎÉÃÉÁÌÉÚÁÃÉÑ ËÏÎÅÞÎÏÊ ÔÏÞËÉ
void EP_Init(uint8_t number, uint8_t type, uint16_t addr_tx, uint16_t addr_rx, uint16_t (*func)(ep_t ep)); void EP_Init(uint8_t number, uint8_t type, uint16_t addr_tx, uint16_t addr_rx, uint16_t (*func)(ep_t ep));
//úÁÐÉÓØ ÍÁÓÓÉ×Á × ÂÕÆÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ ÉÚ ÐÒÅÒÙ×ÁÎÉÑ
void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size); void EP_WriteIRQ(uint8_t number, const uint8_t *buf, uint16_t size);
//úÁÐÉÓØ ÍÁÓÓÉ×Á × ÂÕÆÅÒ ËÏÎÅÞÎÏÊ ÔÏÞËÉ ÉÚ×ÎÅ ÐÒÅÒÙ×ÁÎÉÑ
void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size); void EP_Write(uint8_t number, const uint8_t *buf, uint16_t size);
//þÔÅÎÉÅ ÍÁÓÓÉ×Á ÉÚ ÂÕÆÅÒÁ ËÏÎÅÞÎÏÊ ÔÏÞËÉ int EP_Read(uint8_t number, uint8_t *buf);
void EP_Read(uint8_t number, uint8_t *buf); usb_LineCoding getLineCoding();
void WEAK linecoding_handler(usb_LineCoding *lc);
void WEAK clstate_handler(uint16_t val);
void WEAK break_handler();
void WEAK vendor_handler(config_pack_t *packet);
#endif // __USB_LIB_H__ #endif // __USB_LIB_H__

Binary file not shown.

View File

@ -94,9 +94,11 @@ ADC_TR_HT
ADC_TR_LTÌ65536Ö0 ADC_TR_LTÌ65536Ö0
AHB2PERIPH_BASEÌ65536Ö0 AHB2PERIPH_BASEÌ65536Ö0
AHBPERIPH_BASEÌ65536Ö0 AHBPERIPH_BASEÌ65536Ö0
ALL_OKÌ4Îanon_enum_0Ö0
APBPERIPH_BASEÌ65536Ö0 APBPERIPH_BASEÌ65536Ö0
BCAST_IDÌ65536Ö0 BCAST_IDÌ65536Ö0
BCDRÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
BTABLEÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
BUFFSIZEÌ65536Ö0
CANÌ65536Ö0 CANÌ65536Ö0
CANIDÌ16384Ö0Ïuint16_t CANIDÌ16384Ö0Ïuint16_t
CAN_BASEÌ65536Ö0 CAN_BASEÌ65536Ö0
@ -115,7 +117,7 @@ CAN_BTR_TS2
CAN_BTR_TS2_0Ì65536Ö0 CAN_BTR_TS2_0Ì65536Ö0
CAN_BTR_TS2_1Ì65536Ö0 CAN_BTR_TS2_1Ì65536Ö0
CAN_BTR_TS2_2Ì65536Ö0 CAN_BTR_TS2_2Ì65536Ö0
CAN_BUSYÌ4Îanon_enum_2Ö0 CAN_BUSYÌ4Îanon_enum_4Ö0
CAN_ESR_BOFFÌ65536Ö0 CAN_ESR_BOFFÌ65536Ö0
CAN_ESR_EPVFÌ65536Ö0 CAN_ESR_EPVFÌ65536Ö0
CAN_ESR_EWGFÌ65536Ö0 CAN_ESR_EWGFÌ65536Ö0
@ -1051,7 +1053,7 @@ CAN_FFA1R_FFA6
CAN_FFA1R_FFA7Ì65536Ö0 CAN_FFA1R_FFA7Ì65536Ö0
CAN_FFA1R_FFA8Ì65536Ö0 CAN_FFA1R_FFA8Ì65536Ö0
CAN_FFA1R_FFA9Ì65536Ö0 CAN_FFA1R_FFA9Ì65536Ö0
CAN_FIFO_OVERRUNÌ4Îanon_enum_2Ö0 CAN_FIFO_OVERRUNÌ4Îanon_enum_4Ö0
CAN_FLAG_GOTDUMMYÌ65536Ö0 CAN_FLAG_GOTDUMMYÌ65536Ö0
CAN_FM1R_FBMÌ65536Ö0 CAN_FM1R_FBMÌ65536Ö0
CAN_FM1R_FBM0Ì65536Ö0 CAN_FM1R_FBM0Ì65536Ö0
@ -1119,7 +1121,7 @@ CAN_MSR_SLAK
CAN_MSR_SLAKIÌ65536Ö0 CAN_MSR_SLAKIÌ65536Ö0
CAN_MSR_TXMÌ65536Ö0 CAN_MSR_TXMÌ65536Ö0
CAN_MSR_WKUIÌ65536Ö0 CAN_MSR_WKUIÌ65536Ö0
CAN_OKÌ4Îanon_enum_2Ö0 CAN_OKÌ4Îanon_enum_4Ö0
CAN_RDH0R_DATA4Ì65536Ö0 CAN_RDH0R_DATA4Ì65536Ö0
CAN_RDH0R_DATA5Ì65536Ö0 CAN_RDH0R_DATA5Ì65536Ö0
CAN_RDH0R_DATA6Ì65536Ö0 CAN_RDH0R_DATA6Ì65536Ö0
@ -1142,7 +1144,7 @@ CAN_RDT0R_TIME
CAN_RDT1R_DLCÌ65536Ö0 CAN_RDT1R_DLCÌ65536Ö0
CAN_RDT1R_FMIÌ65536Ö0 CAN_RDT1R_FMIÌ65536Ö0
CAN_RDT1R_TIMEÌ65536Ö0 CAN_RDT1R_TIMEÌ65536Ö0
CAN_READYÌ4Îanon_enum_2Ö0 CAN_READYÌ4Îanon_enum_4Ö0
CAN_RF0R_FMP0Ì65536Ö0 CAN_RF0R_FMP0Ì65536Ö0
CAN_RF0R_FOVR0Ì65536Ö0 CAN_RF0R_FOVR0Ì65536Ö0
CAN_RF0R_FULL0Ì65536Ö0 CAN_RF0R_FULL0Ì65536Ö0
@ -1159,7 +1161,7 @@ CAN_RI1R_EXID
CAN_RI1R_IDEÌ65536Ö0 CAN_RI1R_IDEÌ65536Ö0
CAN_RI1R_RTRÌ65536Ö0 CAN_RI1R_RTRÌ65536Ö0
CAN_RI1R_STIDÌ65536Ö0 CAN_RI1R_STIDÌ65536Ö0
CAN_STOPÌ4Îanon_enum_2Ö0 CAN_STOPÌ4Îanon_enum_4Ö0
CAN_TDH0R_DATA4Ì65536Ö0 CAN_TDH0R_DATA4Ì65536Ö0
CAN_TDH0R_DATA5Ì65536Ö0 CAN_TDH0R_DATA5Ì65536Ö0
CAN_TDH0R_DATA6Ì65536Ö0 CAN_TDH0R_DATA6Ì65536Ö0
@ -1234,7 +1236,7 @@ CAN_TSR_TXOK1
CAN_TSR_TXOK2Ì65536Ö0 CAN_TSR_TXOK2Ì65536Ö0
CAN_get_statusÌ16Í()Ö0ÏCAN_status CAN_get_statusÌ16Í()Ö0ÏCAN_status
CAN_get_statusÌ1024Í()Ö0ÏCAN_status CAN_get_statusÌ1024Í()Ö0ÏCAN_status
CAN_messageÌ4096Ö0Ïanon_struct_1 CAN_messageÌ4096Ö0Ïanon_struct_3
CAN_messagebuf_popÌ16Í()Ö0ÏCAN_message * CAN_messagebuf_popÌ16Í()Ö0ÏCAN_message *
CAN_messagebuf_popÌ1024Í()Ö0ÏCAN_message * CAN_messagebuf_popÌ1024Í()Ö0ÏCAN_message *
CAN_messagebuf_pushÌ16Í(CAN_message *msg)Ö0Ïint CAN_messagebuf_pushÌ16Í(CAN_message *msg)Ö0Ïint
@ -1242,7 +1244,7 @@ CAN_reinit
CAN_reinitÌ1024Í()Ö0Ïvoid CAN_reinitÌ1024Í()Ö0Ïvoid
CAN_setupÌ16Í()Ö0Ïvoid CAN_setupÌ16Í()Ö0Ïvoid
CAN_setupÌ1024Í()Ö0Ïvoid CAN_setupÌ1024Í()Ö0Ïvoid
CAN_statusÌ4096Ö0Ïanon_enum_2 CAN_statusÌ4096Ö0Ïanon_enum_4
CECÌ65536Ö0 CECÌ65536Ö0
CEC_BASEÌ65536Ö0 CEC_BASEÌ65536Ö0
CEC_CFGR_BRDNOGENÌ65536Ö0 CEC_CFGR_BRDNOGENÌ65536Ö0
@ -1286,10 +1288,23 @@ CEC_ISR_TXUDR
CEC_TXDR_RXDÌ65536Ö0 CEC_TXDR_RXDÌ65536Ö0
CEC_TXDR_TXDÌ65536Ö0 CEC_TXDR_TXDÌ65536Ö0
CLEAR_BITÌ131072Í(REG,BIT)Ö0 CLEAR_BITÌ131072Í(REG,BIT)Ö0
CLEAR_COMM_FEATUREÌ65536Ö0
CLEAR_CTR_RXÌ131072Í(R)Ö0
CLEAR_CTR_RX_TXÌ131072Í(R)Ö0
CLEAR_CTR_TXÌ131072Í(R)Ö0
CLEAR_DTOG_RXÌ131072Í(R)Ö0
CLEAR_DTOG_TXÌ131072Í(R)Ö0
CLEAR_FEATUREÌ65536Ö0
CLEAR_REGÌ131072Í(REG)Ö0 CLEAR_REGÌ131072Í(REG)Ö0
CLRLINECODINGÌ131072Í()Ö0
CMD_BCASTÌ65536Ö0 CMD_BCASTÌ65536Ö0
CMD_TOGGLEÌ65536Ö0 CMD_TOGGLEÌ65536Ö0
CNTRÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
CONCATÌ131072Í(a,b)Ö0 CONCATÌ131072Í(a,b)Ö0
CONFIGURATION_DESCRIPTORÌ65536Ö0
CONTROL_DTRÌ65536Ö0
CONTROL_REQUEST_TYPEÌ65536Ö0
CONTROL_RTSÌ65536Ö0
CRCÌ65536Ö0 CRCÌ65536Ö0
CRC_BASEÌ65536Ö0 CRC_BASEÌ65536Ö0
CRC_CR_RESETÌ65536Ö0 CRC_CR_RESETÌ65536Ö0
@ -1333,6 +1348,7 @@ CRS_ISR_SYNCMISS
CRS_ISR_SYNCOKFÌ65536Ö0 CRS_ISR_SYNCOKFÌ65536Ö0
CRS_ISR_SYNCWARNFÌ65536Ö0 CRS_ISR_SYNCWARNFÌ65536Ö0
CRS_ISR_TRIMOVFÌ65536Ö0 CRS_ISR_TRIMOVFÌ65536Ö0
DADDRÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
DBGMCUÌ65536Ö0 DBGMCUÌ65536Ö0
DBGMCU_APB1_FZ_DBG_CAN_STOPÌ65536Ö0 DBGMCU_APB1_FZ_DBG_CAN_STOPÌ65536Ö0
DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUTÌ65536Ö0 DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUTÌ65536Ö0
@ -1366,6 +1382,10 @@ DBGMCU_IDCODE_REV_ID_6
DBGMCU_IDCODE_REV_ID_7Ì65536Ö0 DBGMCU_IDCODE_REV_ID_7Ì65536Ö0
DBGMCU_IDCODE_REV_ID_8Ì65536Ö0 DBGMCU_IDCODE_REV_ID_8Ì65536Ö0
DBGMCU_IDCODE_REV_ID_9Ì65536Ö0 DBGMCU_IDCODE_REV_ID_9Ì65536Ö0
DEVICE_DESCRIPTORÌ65536Ö0
DEVICE_DESCRIPTOR_SIZE_BYTEÌ65536Ö0
DEVICE_QALIFIER_DESCRIPTORÌ65536Ö0
DEVICE_QALIFIER_SIZE_BYTEÌ65536Ö0
DMA1Ì65536Ö0 DMA1Ì65536Ö0
DMA1_BASEÌ65536Ö0 DMA1_BASEÌ65536Ö0
DMA1_Channel1Ì65536Ö0 DMA1_Channel1Ì65536Ö0
@ -1461,7 +1481,24 @@ DMA_ISR_TEIF4
DMA_ISR_TEIF5Ì65536Ö0 DMA_ISR_TEIF5Ì65536Ö0
DMA_ISR_TEIF6Ì65536Ö0 DMA_ISR_TEIF6Ì65536Ö0
DMA_ISR_TEIF7Ì65536Ö0 DMA_ISR_TEIF7Ì65536Ö0
EBUGÌ65536Ö0 EPÌ64Îanon_struct_2Ö0Ïvolatile USB_EPDATA_TypeDef
EP0DATABUF_SIZEÌ65536Ö0
EP0_HandlerÌ16Í(ep_t ep)Ö0Ïuint16_t
EP1_HandlerÌ16Í(ep_t ep)Ö0Ïuint16_t
EP2_HandlerÌ16Í(ep_t ep)Ö0Ïuint16_t
EP_InitÌ16Í(uint8_t number, uint8_t type, uint16_t addr_tx, uint16_t addr_rx, uint16_t (*func)(ep_t ep))Ö0Ïvoid
EP_InitÌ1024Í(uint8_t number, uint8_t type, uint16_t addr_tx, uint16_t addr_rx, uint16_t (*func)(ep_t ep))Ö0Ïvoid
EP_ReadÌ16Í(uint8_t number, uint8_t *buf)Ö0Ïint
EP_ReadÌ1024Í(uint8_t number, uint8_t *buf)Ö0Ïint
EP_TYPE_BULKÌ65536Ö0
EP_TYPE_CONTROLÌ65536Ö0
EP_TYPE_INTERRUPTÌ65536Ö0
EP_TYPE_ISOÌ65536Ö0
EP_WriteÌ16Í(uint8_t number, const uint8_t *buf, uint16_t size)Ö0Ïvoid
EP_WriteÌ1024Í(uint8_t number, const uint8_t *buf, uint16_t size)Ö0Ïvoid
EP_WriteIRQÌ16Í(uint8_t number, const uint8_t *buf, uint16_t size)Ö0Ïvoid
EP_WriteIRQÌ1024Í(uint8_t number, const uint8_t *buf, uint16_t size)Ö0Ïvoid
EPnRÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
EXTIÌ65536Ö0 EXTIÌ65536Ö0
EXTI_BASEÌ65536Ö0 EXTI_BASEÌ65536Ö0
EXTI_EMR_MR0Ì65536Ö0 EXTI_EMR_MR0Ì65536Ö0
@ -1588,6 +1625,7 @@ EXTI_SWIER_SWIER6
EXTI_SWIER_SWIER7Ì65536Ö0 EXTI_SWIER_SWIER7Ì65536Ö0
EXTI_SWIER_SWIER8Ì65536Ö0 EXTI_SWIER_SWIER8Ì65536Ö0
EXTI_SWIER_SWIER9Ì65536Ö0 EXTI_SWIER_SWIER9Ì65536Ö0
FILEÌ4096Ö0Ï_IO_FILE
FLASHÌ65536Ö0 FLASHÌ65536Ö0
FLASH_ACR_LATENCYÌ65536Ö0 FLASH_ACR_LATENCYÌ65536Ö0
FLASH_ACR_PRFTBEÌ65536Ö0 FLASH_ACR_PRFTBEÌ65536Ö0
@ -1629,7 +1667,15 @@ FLASH_SR_PGERR
FLASH_SR_WRPERRÌ65536Ö0 FLASH_SR_WRPERRÌ65536Ö0
FLASH_SR_WRPRTERRÌ65536Ö0 FLASH_SR_WRPRTERRÌ65536Ö0
FLASH_WRPR_WRPÌ65536Ö0 FLASH_WRPR_WRPÌ65536Ö0
FNRÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
FORMUSARTÌ131072Í(X)Ö0 FORMUSARTÌ131072Í(X)Ö0
GET_COMM_FEATUREÌ65536Ö0
GET_CONFIGURATIONÌ65536Ö0
GET_DESCRIPTORÌ65536Ö0
GET_ENCAPSULATED_RESPONSEÌ65536Ö0
GET_INTERFACEÌ65536Ö0
GET_LINE_CODINGÌ65536Ö0
GET_STATUSÌ65536Ö0
GPIOAÌ65536Ö0 GPIOAÌ65536Ö0
GPIOA_BASEÌ65536Ö0 GPIOA_BASEÌ65536Ö0
GPIOBÌ65536Ö0 GPIOBÌ65536Ö0
@ -2133,6 +2179,7 @@ INT_LEAST64_WIDTH
INT_LEAST8_MAXÌ65536Ö0 INT_LEAST8_MAXÌ65536Ö0
INT_LEAST8_MINÌ65536Ö0 INT_LEAST8_MINÌ65536Ö0
INT_LEAST8_WIDTHÌ65536Ö0 INT_LEAST8_WIDTHÌ65536Ö0
ISTRÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
IS_ADC_ALL_INSTANCEÌ131072Í(INSTANCE)Ö0 IS_ADC_ALL_INSTANCEÌ131072Í(INSTANCE)Ö0
IS_ADC_COMMON_INSTANCEÌ131072Í(INSTANCE)Ö0 IS_ADC_COMMON_INSTANCEÌ131072Í(INSTANCE)Ö0
IS_CAN_ALL_INSTANCEÌ131072Í(INSTANCE)Ö0 IS_CAN_ALL_INSTANCEÌ131072Í(INSTANCE)Ö0
@ -2211,6 +2258,10 @@ IWDG_SR_WVU
IWDG_STARTÌ65536Ö0 IWDG_STARTÌ65536Ö0
IWDG_WINR_WINÌ65536Ö0 IWDG_WINR_WINÌ65536Ö0
IWDG_WRITE_ACCESSÌ65536Ö0 IWDG_WRITE_ACCESSÌ65536Ö0
KEEP_DTOG_RXÌ131072Í(R)Ö0
KEEP_DTOG_TXÌ131072Í(R)Ö0
KEEP_STAT_RXÌ131072Í(R)Ö0
KEEP_STAT_TXÌ131072Í(R)Ö0
LED0_pinÌ65536Ö0 LED0_pinÌ65536Ö0
LED0_portÌ65536Ö0 LED0_portÌ65536Ö0
LED1_pinÌ65536Ö0 LED1_pinÌ65536Ö0
@ -2218,7 +2269,8 @@ LED1_port
LED_blinkÌ131072Í(x)Ö0 LED_blinkÌ131072Í(x)Ö0
LED_offÌ131072Í(x)Ö0 LED_offÌ131072Í(x)Ö0
LED_onÌ131072Í(x)Ö0 LED_onÌ131072Í(x)Ö0
LINE_BUSYÌ4Îanon_enum_0Ö0 LPMCSRÌ64Îanon_struct_0Ö0Ïvolatile uint32_t
MAX_ENDPOINTSÌ65536Ö0
MODIFY_REGÌ131072Í(REG,CLEARMASK,SETMASK)Ö0 MODIFY_REGÌ131072Í(REG,CLEARMASK,SETMASK)Ö0
MSGÌ131072Í(str)Ö0 MSGÌ131072Í(str)Ö0
NULLÌ65536Ö0 NULLÌ65536Ö0
@ -2569,6 +2621,14 @@ RCC_IRQn
READ_BITÌ131072Í(REG,BIT)Ö0 READ_BITÌ131072Í(REG,BIT)Ö0
READ_CAN_INV_ADDRÌ131072Í()Ö0 READ_CAN_INV_ADDRÌ131072Í()Ö0
READ_REGÌ131072Í(REG)Ö0 READ_REGÌ131072Í(REG)Ö0
RESERVED1Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RESERVED2Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RESERVED3Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RESERVED4Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RESERVED5Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RESERVED6Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RESERVED7Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RESERVED8Ì64Îanon_struct_0Ö0Ïvolatile uint32_t
RTCÌ65536Ö0 RTCÌ65536Ö0
RTC_ALRMAR_DTÌ65536Ö0 RTC_ALRMAR_DTÌ65536Ö0
RTC_ALRMAR_DT_0Ì65536Ö0 RTC_ALRMAR_DT_0Ì65536Ö0
@ -2844,7 +2904,26 @@ SCB_SHCSR_SVCALLPENDED_Msk
SCB_SHCSR_SVCALLPENDED_PosÌ65536Ö0 SCB_SHCSR_SVCALLPENDED_PosÌ65536Ö0
SCS_BASEÌ65536Ö0 SCS_BASEÌ65536Ö0
SENDÌ131072Í(str)Ö0 SENDÌ131072Í(str)Ö0
SEND_BREAKÌ65536Ö0
SEND_ENCAPSULATED_COMMANDÌ65536Ö0
SETLINECODINGÌ131072Í()Ö0
SET_ADDRESSÌ65536Ö0
SET_BITÌ131072Í(REG,BIT)Ö0 SET_BITÌ131072Í(REG,BIT)Ö0
SET_COMM_FEATUREÌ65536Ö0
SET_CONFIGURATIONÌ65536Ö0
SET_CONTROL_LINE_STATEÌ65536Ö0
SET_DESCRIPTORÌ65536Ö0
SET_DTOG_RXÌ131072Í(R)Ö0
SET_DTOG_TXÌ131072Í(R)Ö0
SET_FEATUREÌ65536Ö0
SET_INTERFACEÌ65536Ö0
SET_LINE_CODINGÌ65536Ö0
SET_NAK_RXÌ131072Í(R)Ö0
SET_NAK_TXÌ131072Í(R)Ö0
SET_STALL_RXÌ131072Í(R)Ö0
SET_STALL_TXÌ131072Í(R)Ö0
SET_VALID_RXÌ131072Í(R)Ö0
SET_VALID_TXÌ131072Í(R)Ö0
SIG_ATOMIC_MAXÌ65536Ö0 SIG_ATOMIC_MAXÌ65536Ö0
SIG_ATOMIC_MINÌ65536Ö0 SIG_ATOMIC_MINÌ65536Ö0
SIG_ATOMIC_WIDTHÌ65536Ö0 SIG_ATOMIC_WIDTHÌ65536Ö0
@ -2927,8 +3006,13 @@ SRAM_BASE
STM32F0Ì65536Ö0 STM32F0Ì65536Ö0
STM32F042x6Ì65536Ö0 STM32F042x6Ì65536Ö0
STRÌ131072Í(s)Ö0 STRÌ131072Í(s)Ö0
STRING_LANG_DESCRIPTORÌ65536Ö0
STRING_LANG_DESCRIPTOR_SIZE_BYTEÌ65536Ö0
STRING_MAN_DESCRIPTORÌ65536Ö0
STRING_PROD_DESCRIPTORÌ65536Ö0
STRING_SN_DESCRIPTORÌ65536Ö0
STR_HELPERÌ131072Í(s)Ö0 STR_HELPERÌ131072Í(s)Ö0
STR_TOO_LONGÌ4Îanon_enum_0Ö0 SYNC_FRAMEÌ65536Ö0
SYSCFGÌ65536Ö0 SYSCFGÌ65536Ö0
SYSCFG_BASEÌ65536Ö0 SYSCFG_BASEÌ65536Ö0
SYSCFG_CFGR1_ADC_DMA_RMPÌ65536Ö0 SYSCFG_CFGR1_ADC_DMA_RMPÌ65536Ö0
@ -3309,6 +3393,8 @@ TIM_SR_CC4OF
TIM_SR_COMIFÌ65536Ö0 TIM_SR_COMIFÌ65536Ö0
TIM_SR_TIFÌ65536Ö0 TIM_SR_TIFÌ65536Ö0
TIM_SR_UIFÌ65536Ö0 TIM_SR_UIFÌ65536Ö0
TOGGLE_DTOG_RXÌ131072Í(R)Ö0
TOGGLE_DTOG_TXÌ131072Í(R)Ö0
TRUE_INLINEÌ65536Ö0 TRUE_INLINEÌ65536Ö0
TSCÌ65536Ö0 TSCÌ65536Ö0
TSC_BASEÌ65536Ö0 TSC_BASEÌ65536Ö0
@ -3496,10 +3582,10 @@ TSC_IOSCR_G8_IO3
TSC_IOSCR_G8_IO4Ì65536Ö0 TSC_IOSCR_G8_IO4Ì65536Ö0
TSC_ISR_EOAFÌ65536Ö0 TSC_ISR_EOAFÌ65536Ö0
TSC_ISR_MCEFÌ65536Ö0 TSC_ISR_MCEFÌ65536Ö0
TXstatusÌ4096Ö0Ïanon_enum_0
TmsÌ16384Ö0Ïvolatile uint32_t TmsÌ16384Ö0Ïvolatile uint32_t
TmsÌ32768Ö0Ïvolatile uint32_t TmsÌ32768Ö0Ïvolatile uint32_t
UARTBUFSZÌ65536Ö0 UARTBUFSZIÌ65536Ö0
UARTBUFSZOÌ65536Ö0
UINT16_CÌ131072Í(c)Ö0 UINT16_CÌ131072Í(c)Ö0
UINT16_MAXÌ65536Ö0 UINT16_MAXÌ65536Ö0
UINT16_WIDTHÌ65536Ö0 UINT16_WIDTHÌ65536Ö0
@ -3667,6 +3753,10 @@ USART_RTOR_BLEN
USART_RTOR_RTOÌ65536Ö0 USART_RTOR_RTOÌ65536Ö0
USART_TDR_TDRÌ65536Ö0 USART_TDR_TDRÌ65536Ö0
USBÌ65536Ö0 USBÌ65536Ö0
USB_ADDR_RXÌ64Îanon_struct_1Ö0Ïvolatile uint16_t
USB_ADDR_TXÌ64Îanon_struct_1Ö0Ïvolatile uint16_t
USB_ADRESSED_STATEÌ65536Ö0
USB_AddrÌ64Îanon_struct_8Ö0Ïuint16_t
USB_BASEÌ65536Ö0 USB_BASEÌ65536Ö0
USB_BCDRÌ65536Ö0 USB_BCDRÌ65536Ö0
USB_BCDR_BCDENÌ65536Ö0 USB_BCDR_BCDENÌ65536Ö0
@ -3679,6 +3769,16 @@ USB_BCDR_PS2DET
USB_BCDR_SDENÌ65536Ö0 USB_BCDR_SDENÌ65536Ö0
USB_BCDR_SDETÌ65536Ö0 USB_BCDR_SDETÌ65536Ö0
USB_BTABLEÌ65536Ö0 USB_BTABLEÌ65536Ö0
USB_BTABLE_BASEÌ65536Ö0
USB_BtableDefÌ4096Ö0Ïanon_struct_2
USB_CDC_1_5_STOP_BITSÌ65536Ö0
USB_CDC_1_STOP_BITSÌ65536Ö0
USB_CDC_2_STOP_BITSÌ65536Ö0
USB_CDC_EVEN_PARITYÌ65536Ö0
USB_CDC_MARK_PARITYÌ65536Ö0
USB_CDC_NO_PARITYÌ65536Ö0
USB_CDC_ODD_PARITYÌ65536Ö0
USB_CDC_SPACE_PARITYÌ65536Ö0
USB_CLR_CTRÌ65536Ö0 USB_CLR_CTRÌ65536Ö0
USB_CLR_ERRÌ65536Ö0 USB_CLR_ERRÌ65536Ö0
USB_CLR_ESOFÌ65536Ö0 USB_CLR_ESOFÌ65536Ö0
@ -3704,9 +3804,20 @@ USB_CNTR_RESUME
USB_CNTR_SOFMÌ65536Ö0 USB_CNTR_SOFMÌ65536Ö0
USB_CNTR_SUSPMÌ65536Ö0 USB_CNTR_SUSPMÌ65536Ö0
USB_CNTR_WKUPMÌ65536Ö0 USB_CNTR_WKUPMÌ65536Ö0
USB_CONFIGURE_STATEÌ65536Ö0
USB_COUNT_RXÌ64Îanon_struct_1Ö0Ïvolatile uint16_t
USB_COUNT_TXÌ64Îanon_struct_1Ö0Ïvolatile uint16_t
USB_COUNTn_NUM_BLOCKÌ65536Ö0
USB_COUNTn_RXÌ65536Ö0
USB_COUNTn_RX_BLSIZEÌ65536Ö0
USB_ConfigDescriptorÌ16384Ö0Ïconst uint8_t
USB_DADDRÌ65536Ö0 USB_DADDRÌ65536Ö0
USB_DADDR_ADDÌ65536Ö0 USB_DADDR_ADDÌ65536Ö0
USB_DADDR_EFÌ65536Ö0 USB_DADDR_EFÌ65536Ö0
USB_DEFAULT_STATEÌ65536Ö0
USB_DevÌ16384Ö0Ïusb_dev_t
USB_DeviceDescriptorÌ16384Ö0Ïconst uint8_t
USB_DeviceQualifierDescriptorÌ16384Ö0Ïconst uint8_t
USB_EP0RÌ65536Ö0 USB_EP0RÌ65536Ö0
USB_EP1RÌ65536Ö0 USB_EP1RÌ65536Ö0
USB_EP2RÌ65536Ö0 USB_EP2RÌ65536Ö0
@ -3716,6 +3827,7 @@ USB_EP5R
USB_EP6RÌ65536Ö0 USB_EP6RÌ65536Ö0
USB_EP7RÌ65536Ö0 USB_EP7RÌ65536Ö0
USB_EPADDR_FIELDÌ65536Ö0 USB_EPADDR_FIELDÌ65536Ö0
USB_EPDATA_TypeDefÌ4096Ö0Ïanon_struct_1
USB_EPKIND_MASKÌ65536Ö0 USB_EPKIND_MASKÌ65536Ö0
USB_EPREG_MASKÌ65536Ö0 USB_EPREG_MASKÌ65536Ö0
USB_EPRX_DTOG1Ì65536Ö0 USB_EPRX_DTOG1Ì65536Ö0
@ -3747,15 +3859,36 @@ USB_EP_TX_VALID
USB_EP_TYPE_MASKÌ65536Ö0 USB_EP_TYPE_MASKÌ65536Ö0
USB_EP_T_FIELDÌ65536Ö0 USB_EP_T_FIELDÌ65536Ö0
USB_EP_T_MASKÌ65536Ö0 USB_EP_T_MASKÌ65536Ö0
USB_EPnR_CTR_RXÌ65536Ö0
USB_EPnR_CTR_TXÌ65536Ö0
USB_EPnR_DTOG_RXÌ65536Ö0
USB_EPnR_DTOG_TXÌ65536Ö0
USB_EPnR_EAÌ65536Ö0
USB_EPnR_EP_KINDÌ65536Ö0
USB_EPnR_EP_TYPEÌ65536Ö0
USB_EPnR_EP_TYPE_0Ì65536Ö0
USB_EPnR_EP_TYPE_1Ì65536Ö0
USB_EPnR_SETUPÌ65536Ö0
USB_EPnR_STAT_RXÌ65536Ö0
USB_EPnR_STAT_RX_0Ì65536Ö0
USB_EPnR_STAT_RX_1Ì65536Ö0
USB_EPnR_STAT_TXÌ65536Ö0
USB_EPnR_STAT_TX_0Ì65536Ö0
USB_EPnR_STAT_TX_1Ì65536Ö0
USB_FNRÌ65536Ö0 USB_FNRÌ65536Ö0
USB_FNR_FNÌ65536Ö0 USB_FNR_FNÌ65536Ö0
USB_FNR_LCKÌ65536Ö0 USB_FNR_LCKÌ65536Ö0
USB_FNR_LSOFÌ65536Ö0 USB_FNR_LSOFÌ65536Ö0
USB_FNR_LSOF_0Ì65536Ö0
USB_FNR_RXDMÌ65536Ö0 USB_FNR_RXDMÌ65536Ö0
USB_FNR_RXDPÌ65536Ö0 USB_FNR_RXDPÌ65536Ö0
USB_FNR_lSOF_1Ì65536Ö0
USB_GetStateÌ16Í()Ö0Ïuint8_t
USB_GetStateÌ1024Í()Ö0Ïuint8_t
USB_ISTRÌ65536Ö0 USB_ISTRÌ65536Ö0
USB_ISTR_CTRÌ65536Ö0 USB_ISTR_CTRÌ65536Ö0
USB_ISTR_DIRÌ65536Ö0 USB_ISTR_DIRÌ65536Ö0
USB_ISTR_EPIDÌ65536Ö0
USB_ISTR_EP_IDÌ65536Ö0 USB_ISTR_EP_IDÌ65536Ö0
USB_ISTR_ERRÌ65536Ö0 USB_ISTR_ERRÌ65536Ö0
USB_ISTR_ESOFÌ65536Ö0 USB_ISTR_ESOFÌ65536Ö0
@ -3765,22 +3898,47 @@ USB_ISTR_RESET
USB_ISTR_SOFÌ65536Ö0 USB_ISTR_SOFÌ65536Ö0
USB_ISTR_SUSPÌ65536Ö0 USB_ISTR_SUSPÌ65536Ö0
USB_ISTR_WKUPÌ65536Ö0 USB_ISTR_WKUPÌ65536Ö0
USB_InitÌ1024Í()Ö0Ïvoid
USB_LPMCSRÌ65536Ö0 USB_LPMCSRÌ65536Ö0
USB_LPMCSR_BESLÌ65536Ö0 USB_LPMCSR_BESLÌ65536Ö0
USB_LPMCSR_BESL_0Ì65536Ö0
USB_LPMCSR_BESL_1Ì65536Ö0
USB_LPMCSR_BESL_2Ì65536Ö0
USB_LPMCSR_BESL_3Ì65536Ö0
USB_LPMCSR_LMPENÌ65536Ö0 USB_LPMCSR_LMPENÌ65536Ö0
USB_LPMCSR_LPMACKÌ65536Ö0 USB_LPMCSR_LPMACKÌ65536Ö0
USB_LPMCSR_REMWAKEÌ65536Ö0 USB_LPMCSR_REMWAKEÌ65536Ö0
USB_PMAADDRÌ65536Ö0 USB_PMAADDRÌ65536Ö0
USB_StatusÌ64Îanon_struct_8Ö0Ïuint8_t
USB_StringLangDescriptorÌ16384Ö0Ïconst uint8_t
USB_StringManufacturingDescriptorÌ2048Ö0
USB_StringManufacturingDescriptorÌ16384Ö0
USB_StringProdDescriptorÌ2048Ö0
USB_StringProdDescriptorÌ16384Ö0
USB_StringSerialDescriptorÌ2048Ö0
USB_StringSerialDescriptorÌ16384Ö0
USB_TypeDefÌ65536Ö0
USB_TypeDef_customÌ4096Ö0Ïanon_struct_0
USB_sendÌ16Í(char *buf)Ö0Ïvoid
USB_sendÌ1024Í(char *buf)Ö0Ïvoid
USB_setupÌ16Í()Ö0Ïvoid
USB_setupÌ1024Í()Ö0Ïvoid
VDDIO2_IRQHandlerÌ65536Ö0 VDDIO2_IRQHandlerÌ65536Ö0
VDDIO2_IRQnÌ65536Ö0 VDDIO2_IRQnÌ65536Ö0
VENDOR_MASK_REQUESTÌ65536Ö0
VENDOR_READ_REQUEST_TYPEÌ65536Ö0
VENDOR_REQUESTÌ65536Ö0
VENDOR_WRITE_REQUEST_TYPEÌ65536Ö0
VREFINT_CAL_ADDRÌ65536Ö0 VREFINT_CAL_ADDRÌ65536Ö0
WCHAR_MAXÌ65536Ö0 WCHAR_MAXÌ65536Ö0
WCHAR_MINÌ65536Ö0 WCHAR_MINÌ65536Ö0
WCHAR_WIDTHÌ65536Ö0 WCHAR_WIDTHÌ65536Ö0
WEAKÌ65536Ö0 WEAKÌ65536Ö0
WEOFÌ65536Ö0
WINT_MAXÌ65536Ö0 WINT_MAXÌ65536Ö0
WINT_MINÌ65536Ö0 WINT_MINÌ65536Ö0
WINT_WIDTHÌ65536Ö0 WINT_WIDTHÌ65536Ö0
WRITEDUMPÌ131072Í(str)Ö0
WRITE_REGÌ131072Í(REG,VAL)Ö0 WRITE_REGÌ131072Í(REG,VAL)Ö0
WWDGÌ65536Ö0 WWDGÌ65536Ö0
WWDG_BASEÌ65536Ö0 WWDG_BASEÌ65536Ö0
@ -3807,6 +3965,8 @@ WWDG_CR_T6
WWDG_CR_WDGAÌ65536Ö0 WWDG_CR_WDGAÌ65536Ö0
WWDG_SR_EWIFÌ65536Ö0 WWDG_SR_EWIFÌ65536Ö0
_ATFILE_SOURCEÌ65536Ö0 _ATFILE_SOURCEÌ65536Ö0
_BITS_FLOATN_COMMON_HÌ65536Ö0
_BITS_FLOATN_HÌ65536Ö0
_BITS_STDINT_INTN_HÌ65536Ö0 _BITS_STDINT_INTN_HÌ65536Ö0
_BITS_STDINT_UINTN_HÌ65536Ö0 _BITS_STDINT_UINTN_HÌ65536Ö0
_BITS_STRING_FORTIFIED_HÌ65536Ö0 _BITS_STRING_FORTIFIED_HÌ65536Ö0
@ -3818,12 +3978,20 @@ _BITS_WCHAR_H
_BIT_SHIFTÌ131072Í(IRQn)Ö0 _BIT_SHIFTÌ131072Í(IRQn)Ö0
_BSD_SIZE_T_Ì65536Ö0 _BSD_SIZE_T_Ì65536Ö0
_BSD_SIZE_T_DEFINED_Ì65536Ö0 _BSD_SIZE_T_DEFINED_Ì65536Ö0
_BSD_WCHAR_T_Ì65536Ö0
_DEFAULT_SOURCEÌ65536Ö0 _DEFAULT_SOURCEÌ65536Ö0
_FEATURES_HÌ65536Ö0 _FEATURES_HÌ65536Ö0
_FORTIFY_SOURCEÌ65536Ö0 _FORTIFY_SOURCEÌ65536Ö0
_Float128Ì4096Ö0Ï__float128
_Float32Ì4096Ö0Ïfloat
_Float32xÌ4096Ö0Ïdouble
_Float64Ì4096Ö0Ïdouble
_Float64xÌ4096Ö0Ïlong double
_GCC_SIZE_TÌ65536Ö0 _GCC_SIZE_TÌ65536Ö0
_GCC_WCHAR_TÌ65536Ö0
_GCC_WRAP_STDINT_HÌ65536Ö0 _GCC_WRAP_STDINT_HÌ65536Ö0
_GNU_SOURCEÌ65536Ö0 _GNU_SOURCEÌ65536Ö0
_IO_FILEÌ32768Ö0
_IP_IDXÌ131072Í(IRQn)Ö0 _IP_IDXÌ131072Í(IRQn)Ö0
_ISOC11_SOURCEÌ65536Ö0 _ISOC11_SOURCEÌ65536Ö0
_ISOC95_SOURCEÌ65536Ö0 _ISOC95_SOURCEÌ65536Ö0
@ -3848,6 +4016,17 @@ _SYS_CDEFS_H
_SYS_SIZE_T_HÌ65536Ö0 _SYS_SIZE_T_HÌ65536Ö0
_T_SIZEÌ65536Ö0 _T_SIZEÌ65536Ö0
_T_SIZE_Ì65536Ö0 _T_SIZE_Ì65536Ö0
_T_WCHARÌ65536Ö0
_T_WCHAR_Ì65536Ö0
_USB_STRING_Ì131072Í(name,str)Ö0
_WCHAR_HÌ65536Ö0
_WCHAR_TÌ65536Ö0
_WCHAR_T_Ì65536Ö0
_WCHAR_T_DECLAREDÌ65536Ö0
_WCHAR_T_DEFINEDÌ65536Ö0
_WCHAR_T_DEFINED_Ì65536Ö0
_WCHAR_T_HÌ65536Ö0
_WINT_TÌ65536Ö0
_XOPEN_SOURCEÌ65536Ö0 _XOPEN_SOURCEÌ65536Ö0
_XOPEN_SOURCE_EXTENDEDÌ65536Ö0 _XOPEN_SOURCE_EXTENDEDÌ65536Ö0
__ASMÌ65536Ö0 __ASMÌ65536Ö0
@ -3869,6 +4048,11 @@ __BLKCNT_T_TYPE
__BLKSIZE_T_TYPEÌ65536Ö0 __BLKSIZE_T_TYPEÌ65536Ö0
__BYTE_ORDER__Ì65536Ö0 __BYTE_ORDER__Ì65536Ö0
__CAN_H__Ì65536Ö0 __CAN_H__Ì65536Ö0
__CFLOAT128Ì65536Ö0
__CFLOAT32Ì65536Ö0
__CFLOAT32XÌ65536Ö0
__CFLOAT64Ì65536Ö0
__CFLOAT64XÌ65536Ö0
__CHAR16_TYPE__Ì65536Ö0 __CHAR16_TYPE__Ì65536Ö0
__CHAR32_TYPE__Ì65536Ö0 __CHAR32_TYPE__Ì65536Ö0
__CHAR_BIT__Ì65536Ö0 __CHAR_BIT__Ì65536Ö0
@ -3887,6 +4071,7 @@ __CORE_CMFUNC_H
__CORE_CMINSTR_HÌ65536Ö0 __CORE_CMINSTR_HÌ65536Ö0
__CORRECT_ISO_CPP_STRINGS_H_PROTOÌ65536Ö0 __CORRECT_ISO_CPP_STRINGS_H_PROTOÌ65536Ö0
__CORRECT_ISO_CPP_STRING_H_PROTOÌ65536Ö0 __CORRECT_ISO_CPP_STRING_H_PROTOÌ65536Ö0
__CORRECT_ISO_CPP_WCHAR_H_PROTOÌ65536Ö0
__CORTEX_MÌ65536Ö0 __CORTEX_MÌ65536Ö0
__CPU_MASK_TYPEÌ65536Ö0 __CPU_MASK_TYPEÌ65536Ö0
__DADDR_T_TYPEÌ65536Ö0 __DADDR_T_TYPEÌ65536Ö0
@ -3934,12 +4119,85 @@ __ELF__
__END_DECLSÌ65536Ö0 __END_DECLSÌ65536Ö0
__EXCEPTIONSÌ65536Ö0 __EXCEPTIONSÌ65536Ö0
__FD_SETSIZEÌ65536Ö0 __FD_SETSIZEÌ65536Ö0
__FILEÌ4096Ö0Ï_IO_FILE
__FILE_definedÌ65536Ö0
__FINITE_MATH_ONLY__Ì65536Ö0 __FINITE_MATH_ONLY__Ì65536Ö0
__FLOAT_WORD_ORDER__Ì65536Ö0 __FLOAT_WORD_ORDER__Ì65536Ö0
__FLT128_DECIMAL_DIG__Ì65536Ö0
__FLT128_DENORM_MIN__Ì65536Ö0
__FLT128_DIG__Ì65536Ö0
__FLT128_EPSILON__Ì65536Ö0
__FLT128_HAS_DENORM__Ì65536Ö0
__FLT128_HAS_INFINITY__Ì65536Ö0
__FLT128_HAS_QUIET_NAN__Ì65536Ö0
__FLT128_MANT_DIG__Ì65536Ö0
__FLT128_MAX_10_EXP__Ì65536Ö0
__FLT128_MAX_EXP__Ì65536Ö0
__FLT128_MAX__Ì65536Ö0
__FLT128_MIN_10_EXP__Ì65536Ö0
__FLT128_MIN_EXP__Ì65536Ö0
__FLT128_MIN__Ì65536Ö0
__FLT32X_DECIMAL_DIG__Ì65536Ö0
__FLT32X_DENORM_MIN__Ì65536Ö0
__FLT32X_DIG__Ì65536Ö0
__FLT32X_EPSILON__Ì65536Ö0
__FLT32X_HAS_DENORM__Ì65536Ö0
__FLT32X_HAS_INFINITY__Ì65536Ö0
__FLT32X_HAS_QUIET_NAN__Ì65536Ö0
__FLT32X_MANT_DIG__Ì65536Ö0
__FLT32X_MAX_10_EXP__Ì65536Ö0
__FLT32X_MAX_EXP__Ì65536Ö0
__FLT32X_MAX__Ì65536Ö0
__FLT32X_MIN_10_EXP__Ì65536Ö0
__FLT32X_MIN_EXP__Ì65536Ö0
__FLT32X_MIN__Ì65536Ö0
__FLT32_DECIMAL_DIG__Ì65536Ö0
__FLT32_DENORM_MIN__Ì65536Ö0
__FLT32_DIG__Ì65536Ö0
__FLT32_EPSILON__Ì65536Ö0
__FLT32_HAS_DENORM__Ì65536Ö0
__FLT32_HAS_INFINITY__Ì65536Ö0
__FLT32_HAS_QUIET_NAN__Ì65536Ö0
__FLT32_MANT_DIG__Ì65536Ö0
__FLT32_MAX_10_EXP__Ì65536Ö0
__FLT32_MAX_EXP__Ì65536Ö0
__FLT32_MAX__Ì65536Ö0
__FLT32_MIN_10_EXP__Ì65536Ö0
__FLT32_MIN_EXP__Ì65536Ö0
__FLT32_MIN__Ì65536Ö0
__FLT64X_DECIMAL_DIG__Ì65536Ö0
__FLT64X_DENORM_MIN__Ì65536Ö0
__FLT64X_DIG__Ì65536Ö0
__FLT64X_EPSILON__Ì65536Ö0
__FLT64X_HAS_DENORM__Ì65536Ö0
__FLT64X_HAS_INFINITY__Ì65536Ö0
__FLT64X_HAS_QUIET_NAN__Ì65536Ö0
__FLT64X_MANT_DIG__Ì65536Ö0
__FLT64X_MAX_10_EXP__Ì65536Ö0
__FLT64X_MAX_EXP__Ì65536Ö0
__FLT64X_MAX__Ì65536Ö0
__FLT64X_MIN_10_EXP__Ì65536Ö0
__FLT64X_MIN_EXP__Ì65536Ö0
__FLT64X_MIN__Ì65536Ö0
__FLT64_DECIMAL_DIG__Ì65536Ö0
__FLT64_DENORM_MIN__Ì65536Ö0
__FLT64_DIG__Ì65536Ö0
__FLT64_EPSILON__Ì65536Ö0
__FLT64_HAS_DENORM__Ì65536Ö0
__FLT64_HAS_INFINITY__Ì65536Ö0
__FLT64_HAS_QUIET_NAN__Ì65536Ö0
__FLT64_MANT_DIG__Ì65536Ö0
__FLT64_MAX_10_EXP__Ì65536Ö0
__FLT64_MAX_EXP__Ì65536Ö0
__FLT64_MAX__Ì65536Ö0
__FLT64_MIN_10_EXP__Ì65536Ö0
__FLT64_MIN_EXP__Ì65536Ö0
__FLT64_MIN__Ì65536Ö0
__FLT_DECIMAL_DIG__Ì65536Ö0 __FLT_DECIMAL_DIG__Ì65536Ö0
__FLT_DENORM_MIN__Ì65536Ö0 __FLT_DENORM_MIN__Ì65536Ö0
__FLT_DIG__Ì65536Ö0 __FLT_DIG__Ì65536Ö0
__FLT_EPSILON__Ì65536Ö0 __FLT_EPSILON__Ì65536Ö0
__FLT_EVAL_METHOD_TS_18661_3__Ì65536Ö0
__FLT_EVAL_METHOD__Ì65536Ö0 __FLT_EVAL_METHOD__Ì65536Ö0
__FLT_HAS_DENORM__Ì65536Ö0 __FLT_HAS_DENORM__Ì65536Ö0
__FLT_HAS_INFINITY__Ì65536Ö0 __FLT_HAS_INFINITY__Ì65536Ö0
@ -3996,6 +4254,7 @@ __GNUC_MINOR__
__GNUC_PATCHLEVEL__Ì65536Ö0 __GNUC_PATCHLEVEL__Ì65536Ö0
__GNUC_PREREQÌ131072Í(maj,min)Ö0 __GNUC_PREREQÌ131072Í(maj,min)Ö0
__GNUC_STDC_INLINE__Ì65536Ö0 __GNUC_STDC_INLINE__Ì65536Ö0
__GNUC_VA_LISTÌ65536Ö0
__GNUC__Ì65536Ö0 __GNUC__Ì65536Ö0
__GNUG__Ì65536Ö0 __GNUG__Ì65536Ö0
__GNU_LIBRARY__Ì65536Ö0 __GNU_LIBRARY__Ì65536Ö0
@ -4004,6 +4263,22 @@ __GXX_EXPERIMENTAL_CXX0X__
__GXX_RTTIÌ65536Ö0 __GXX_RTTIÌ65536Ö0
__GXX_WEAK__Ì65536Ö0 __GXX_WEAK__Ì65536Ö0
__HARDWARE_H__Ì65536Ö0 __HARDWARE_H__Ì65536Ö0
__HAVE_DISTINCT_FLOAT128Ì65536Ö0
__HAVE_DISTINCT_FLOAT128XÌ65536Ö0
__HAVE_DISTINCT_FLOAT16Ì65536Ö0
__HAVE_DISTINCT_FLOAT32Ì65536Ö0
__HAVE_DISTINCT_FLOAT32XÌ65536Ö0
__HAVE_DISTINCT_FLOAT64Ì65536Ö0
__HAVE_DISTINCT_FLOAT64XÌ65536Ö0
__HAVE_FLOAT128Ì65536Ö0
__HAVE_FLOAT128XÌ65536Ö0
__HAVE_FLOAT16Ì65536Ö0
__HAVE_FLOAT32Ì65536Ö0
__HAVE_FLOAT32XÌ65536Ö0
__HAVE_FLOAT64Ì65536Ö0
__HAVE_FLOAT64XÌ65536Ö0
__HAVE_FLOAT64X_LONG_DOUBLEÌ65536Ö0
__HAVE_FLOATN_NOT_TYPEDEFÌ65536Ö0
__HAVE_GENERIC_SELECTIONÌ65536Ö0 __HAVE_GENERIC_SELECTIONÌ65536Ö0
__IÌ65536Ö0 __IÌ65536Ö0
__ID_T_TYPEÌ65536Ö0 __ID_T_TYPEÌ65536Ö0
@ -4026,28 +4301,41 @@ __INT8_TYPE__
__INTMAX_CÌ131072Í(c)Ö0 __INTMAX_CÌ131072Í(c)Ö0
__INTMAX_MAX__Ì65536Ö0 __INTMAX_MAX__Ì65536Ö0
__INTMAX_TYPE__Ì65536Ö0 __INTMAX_TYPE__Ì65536Ö0
__INTMAX_WIDTH__Ì65536Ö0
__INTPTR_MAX__Ì65536Ö0 __INTPTR_MAX__Ì65536Ö0
__INTPTR_TYPE__Ì65536Ö0 __INTPTR_TYPE__Ì65536Ö0
__INTPTR_WIDTH__Ì65536Ö0
__INT_FAST16_MAX__Ì65536Ö0 __INT_FAST16_MAX__Ì65536Ö0
__INT_FAST16_TYPE__Ì65536Ö0 __INT_FAST16_TYPE__Ì65536Ö0
__INT_FAST16_WIDTH__Ì65536Ö0
__INT_FAST32_MAX__Ì65536Ö0 __INT_FAST32_MAX__Ì65536Ö0
__INT_FAST32_TYPE__Ì65536Ö0 __INT_FAST32_TYPE__Ì65536Ö0
__INT_FAST32_WIDTH__Ì65536Ö0
__INT_FAST64_MAX__Ì65536Ö0 __INT_FAST64_MAX__Ì65536Ö0
__INT_FAST64_TYPE__Ì65536Ö0 __INT_FAST64_TYPE__Ì65536Ö0
__INT_FAST64_WIDTH__Ì65536Ö0
__INT_FAST8_MAX__Ì65536Ö0 __INT_FAST8_MAX__Ì65536Ö0
__INT_FAST8_TYPE__Ì65536Ö0 __INT_FAST8_TYPE__Ì65536Ö0
__INT_FAST8_WIDTH__Ì65536Ö0
__INT_LEAST16_MAX__Ì65536Ö0 __INT_LEAST16_MAX__Ì65536Ö0
__INT_LEAST16_TYPE__Ì65536Ö0 __INT_LEAST16_TYPE__Ì65536Ö0
__INT_LEAST16_WIDTH__Ì65536Ö0
__INT_LEAST32_MAX__Ì65536Ö0 __INT_LEAST32_MAX__Ì65536Ö0
__INT_LEAST32_TYPE__Ì65536Ö0 __INT_LEAST32_TYPE__Ì65536Ö0
__INT_LEAST32_WIDTH__Ì65536Ö0
__INT_LEAST64_MAX__Ì65536Ö0 __INT_LEAST64_MAX__Ì65536Ö0
__INT_LEAST64_TYPE__Ì65536Ö0 __INT_LEAST64_TYPE__Ì65536Ö0
__INT_LEAST64_WIDTH__Ì65536Ö0
__INT_LEAST8_MAX__Ì65536Ö0 __INT_LEAST8_MAX__Ì65536Ö0
__INT_LEAST8_TYPE__Ì65536Ö0 __INT_LEAST8_TYPE__Ì65536Ö0
__INT_LEAST8_WIDTH__Ì65536Ö0
__INT_MAX__Ì65536Ö0 __INT_MAX__Ì65536Ö0
__INT_WCHAR_T_HÌ65536Ö0
__INT_WIDTH__Ì65536Ö0
__IOÌ65536Ö0 __IOÌ65536Ö0
__KERNEL_STRICT_NAMESÌ65536Ö0 __KERNEL_STRICT_NAMESÌ65536Ö0
__KEY_T_TYPEÌ65536Ö0 __KEY_T_TYPEÌ65536Ö0
__LDBL_DECIMAL_DIG__Ì65536Ö0
__LDBL_DENORM_MIN__Ì65536Ö0 __LDBL_DENORM_MIN__Ì65536Ö0
__LDBL_DIG__Ì65536Ö0 __LDBL_DIG__Ì65536Ö0
__LDBL_EPSILON__Ì65536Ö0 __LDBL_EPSILON__Ì65536Ö0
@ -4069,7 +4357,9 @@ __LDBL_REDIR_NTH
__LEAFÌ65536Ö0 __LEAFÌ65536Ö0
__LEAF_ATTRÌ65536Ö0 __LEAF_ATTRÌ65536Ö0
__LONG_LONG_MAX__Ì65536Ö0 __LONG_LONG_MAX__Ì65536Ö0
__LONG_LONG_WIDTH__Ì65536Ö0
__LONG_MAX__Ì65536Ö0 __LONG_MAX__Ì65536Ö0
__LONG_WIDTH__Ì65536Ö0
__LP64__Ì65536Ö0 __LP64__Ì65536Ö0
__MMX__Ì65536Ö0 __MMX__Ì65536Ö0
__MODE_T_TYPEÌ65536Ö0 __MODE_T_TYPEÌ65536Ö0
@ -4096,6 +4386,7 @@ __PMT
__PRAGMA_REDEFINE_EXTNAMEÌ65536Ö0 __PRAGMA_REDEFINE_EXTNAMEÌ65536Ö0
__PTRDIFF_MAX__Ì65536Ö0 __PTRDIFF_MAX__Ì65536Ö0
__PTRDIFF_TYPE__Ì65536Ö0 __PTRDIFF_TYPE__Ì65536Ö0
__PTRDIFF_WIDTH__Ì65536Ö0
__REDIRECTÌ131072Í(name,proto,alias)Ö0 __REDIRECTÌ131072Í(name,proto,alias)Ö0
__REDIRECT_LDBLÌ131072Í(name,proto,alias)Ö0 __REDIRECT_LDBLÌ131072Í(name,proto,alias)Ö0
__REDIRECT_NTHÌ131072Í(name,proto,alias)Ö0 __REDIRECT_NTHÌ131072Í(name,proto,alias)Ö0
@ -4109,12 +4400,15 @@ __S16_TYPE
__S32_TYPEÌ65536Ö0 __S32_TYPEÌ65536Ö0
__S64_TYPEÌ65536Ö0 __S64_TYPEÌ65536Ö0
__SCHAR_MAX__Ì65536Ö0 __SCHAR_MAX__Ì65536Ö0
__SCHAR_WIDTH__Ì65536Ö0
__SEG_FSÌ65536Ö0 __SEG_FSÌ65536Ö0
__SEG_GSÌ65536Ö0 __SEG_GSÌ65536Ö0
__SHRT_MAX__Ì65536Ö0 __SHRT_MAX__Ì65536Ö0
__SHRT_WIDTH__Ì65536Ö0
__SIG_ATOMIC_MAX__Ì65536Ö0 __SIG_ATOMIC_MAX__Ì65536Ö0
__SIG_ATOMIC_MIN__Ì65536Ö0 __SIG_ATOMIC_MIN__Ì65536Ö0
__SIG_ATOMIC_TYPE__Ì65536Ö0 __SIG_ATOMIC_TYPE__Ì65536Ö0
__SIG_ATOMIC_WIDTH__Ì65536Ö0
__SIZEOF_DOUBLE__Ì65536Ö0 __SIZEOF_DOUBLE__Ì65536Ö0
__SIZEOF_FLOAT128__Ì65536Ö0 __SIZEOF_FLOAT128__Ì65536Ö0
__SIZEOF_FLOAT80__Ì65536Ö0 __SIZEOF_FLOAT80__Ì65536Ö0
@ -4134,6 +4428,7 @@ __SIZE_MAX__
__SIZE_TÌ65536Ö0 __SIZE_TÌ65536Ö0
__SIZE_TYPE__Ì65536Ö0 __SIZE_TYPE__Ì65536Ö0
__SIZE_T__Ì65536Ö0 __SIZE_T__Ì65536Ö0
__SIZE_WIDTH__Ì65536Ö0
__SLONG32_TYPEÌ65536Ö0 __SLONG32_TYPEÌ65536Ö0
__SLONGWORD_TYPEÌ65536Ö0 __SLONGWORD_TYPEÌ65536Ö0
__SQUAD_TYPEÌ65536Ö0 __SQUAD_TYPEÌ65536Ö0
@ -4215,6 +4510,9 @@ __ULONG32_TYPE
__ULONGWORD_TYPEÌ65536Ö0 __ULONGWORD_TYPEÌ65536Ö0
__UQUAD_TYPEÌ65536Ö0 __UQUAD_TYPEÌ65536Ö0
__USART_H__Ì65536Ö0 __USART_H__Ì65536Ö0
__USB_DEFS_H__Ì65536Ö0
__USB_H__Ì65536Ö0
__USB_LIB_H__Ì65536Ö0
__USECONDS_T_TYPEÌ65536Ö0 __USECONDS_T_TYPEÌ65536Ö0
__USER_LABEL_PREFIX__Ì65536Ö0 __USER_LABEL_PREFIX__Ì65536Ö0
__USE_ATFILEÌ65536Ö0 __USE_ATFILEÌ65536Ö0
@ -4245,15 +4543,23 @@ __VERSION__
__Vendor_SysTickConfigÌ65536Ö0 __Vendor_SysTickConfigÌ65536Ö0
__WCHAR_MAXÌ65536Ö0 __WCHAR_MAXÌ65536Ö0
__WCHAR_MAX__Ì65536Ö0 __WCHAR_MAX__Ì65536Ö0
__WCHAR_MB_LEN_MAXÌ65536Ö0
__WCHAR_MINÌ65536Ö0 __WCHAR_MINÌ65536Ö0
__WCHAR_MIN__Ì65536Ö0 __WCHAR_MIN__Ì65536Ö0
__WCHAR_TÌ65536Ö0
__WCHAR_TYPE__Ì65536Ö0 __WCHAR_TYPE__Ì65536Ö0
__WCHAR_T__Ì65536Ö0
__WCHAR_WIDTH__Ì65536Ö0
__WINT_MAX__Ì65536Ö0 __WINT_MAX__Ì65536Ö0
__WINT_MIN__Ì65536Ö0 __WINT_MIN__Ì65536Ö0
__WINT_TYPE__Ì65536Ö0 __WINT_TYPE__Ì65536Ö0
__WINT_WIDTH__Ì65536Ö0
__WORDSIZEÌ65536Ö0 __WORDSIZEÌ65536Ö0
__WORDSIZE_TIME64_COMPAT32Ì65536Ö0 __WORDSIZE_TIME64_COMPAT32Ì65536Ö0
____FILE_definedÌ65536Ö0
____mbstate_t_definedÌ65536Ö0
___int_size_t_hÌ65536Ö0 ___int_size_t_hÌ65536Ö0
___int_wchar_t_hÌ65536Ö0
__always_inlineÌ65536Ö0 __always_inlineÌ65536Ö0
__amd64Ì65536Ö0 __amd64Ì65536Ö0
__amd64__Ì65536Ö0 __amd64__Ì65536Ö0
@ -4272,7 +4578,9 @@ __attribute_used__
__attribute_warn_unused_result__Ì65536Ö0 __attribute_warn_unused_result__Ì65536Ö0
__bosÌ131072Í(ptr)Ö0 __bosÌ131072Í(ptr)Ö0
__bos0Ì131072Í(ptr)Ö0 __bos0Ì131072Í(ptr)Ö0
__cfloat128Ì4096Ö0Ï_Complex float
__code_model_small__Ì65536Ö0 __code_model_small__Ì65536Ö0
__countÌ64Îanon_struct_5Ö0Ïint
__cplusplusÌ65536Ö0 __cplusplusÌ65536Ö0
__cpp_aggregate_nsdmiÌ65536Ö0 __cpp_aggregate_nsdmiÌ65536Ö0
__cpp_alias_templatesÌ65536Ö0 __cpp_alias_templatesÌ65536Ö0
@ -4301,14 +4609,24 @@ __cpp_rvalue_reference
__cpp_rvalue_referencesÌ65536Ö0 __cpp_rvalue_referencesÌ65536Ö0
__cpp_sized_deallocationÌ65536Ö0 __cpp_sized_deallocationÌ65536Ö0
__cpp_static_assertÌ65536Ö0 __cpp_static_assertÌ65536Ö0
__cpp_threadsafe_static_initÌ65536Ö0
__cpp_unicode_charactersÌ65536Ö0 __cpp_unicode_charactersÌ65536Ö0
__cpp_unicode_literalsÌ65536Ö0 __cpp_unicode_literalsÌ65536Ö0
__cpp_user_defined_literalsÌ65536Ö0 __cpp_user_defined_literalsÌ65536Ö0
__cpp_variable_templatesÌ65536Ö0 __cpp_variable_templatesÌ65536Ö0
__cpp_variadic_templatesÌ65536Ö0 __cpp_variadic_templatesÌ65536Ö0
__ctype_bÌ64Î__locale_structÖ0Ïconst unsigned short int *
__ctype_tolowerÌ64Î__locale_structÖ0Ïconst int *
__ctype_toupperÌ64Î__locale_structÖ0Ïconst int *
__ep_tÌ2048Ö0
__errordeclÌ131072Í(name,msg)Ö0 __errordeclÌ131072Í(name,msg)Ö0
__extern_always_inlineÌ65536Ö0 __extern_always_inlineÌ65536Ö0
__extern_inlineÌ65536Ö0 __extern_inlineÌ65536Ö0
__f128Ì131072Í(x)Ö0
__f32Ì131072Í(x)Ö0
__f32xÌ131072Í(x)Ö0
__f64Ì131072Í(x)Ö0
__f64xÌ131072Í(x)Ö0
__flexarrÌ65536Ö0 __flexarrÌ65536Ö0
__fortify_functionÌ65536Ö0 __fortify_functionÌ65536Ö0
__glibc_c99_flexarr_availableÌ65536Ö0 __glibc_c99_flexarr_availableÌ65536Ö0
@ -4319,6 +4637,7 @@ __glibc_macro_warning
__glibc_macro_warning1Ì131072Í(message)Ö0 __glibc_macro_warning1Ì131072Í(message)Ö0
__glibc_unlikelyÌ131072Í(cond)Ö0 __glibc_unlikelyÌ131072Í(cond)Ö0
__gnu_linux__Ì65536Ö0 __gnu_linux__Ì65536Ö0
__gnuc_va_listÌ4096Ö0Ï__builtin_va_list
__has_includeÌ131072Í(STR)Ö0 __has_includeÌ131072Í(STR)Ö0
__has_include_nextÌ131072Í(STR)Ö0 __has_include_nextÌ131072Í(STR)Ö0
__intptr_t_definedÌ65536Ö0 __intptr_t_definedÌ65536Ö0
@ -4326,8 +4645,16 @@ __k8
__k8__Ì65536Ö0 __k8__Ì65536Ö0
__linuxÌ65536Ö0 __linuxÌ65536Ö0
__linux__Ì65536Ö0 __linux__Ì65536Ö0
__locale_structÌ2048Ö0
__locale_tÌ4096Ö0Ï__locale_struct
__localesÌ64Î__locale_structÖ0Ï__locale_data
__mbstate_tÌ4096Ö0Ïanon_struct_5
__mbstate_t_definedÌ65536Ö0
__namesÌ64Î__locale_structÖ0Ïconst char *
__need_NULLÌ65536Ö0 __need_NULLÌ65536Ö0
__need___va_listÌ65536Ö0
__need_size_tÌ65536Ö0 __need_size_tÌ65536Ö0
__need_wchar_tÌ65536Ö0
__nonnullÌ131072Í(params)Ö0 __nonnullÌ131072Í(params)Ö0
__pic__Ì65536Ö0 __pic__Ì65536Ö0
__pie__Ì65536Ö0 __pie__Ì65536Ö0
@ -4354,14 +4681,46 @@ __unix
__unix__Ì65536Ö0 __unix__Ì65536Ö0
__va_arg_packÌ131072Í()Ö0 __va_arg_packÌ131072Í()Ö0
__va_arg_pack_lenÌ131072Í()Ö0 __va_arg_pack_lenÌ131072Í()Ö0
__valueÌ64Îanon_struct_5Ö0Ïanon_union_6
__warnattrÌ131072Í(msg)Ö0 __warnattrÌ131072Í(msg)Ö0
__warndeclÌ131072Í(name,msg)Ö0 __warndeclÌ131072Í(name,msg)Ö0
__wchÌ64Îanon_struct_5::anon_union_6Ö0Ïunsigned int
__wchar_t__Ì65536Ö0
__wchbÌ64Îanon_struct_5::anon_union_6Ö0Ïchar
__wint_t_definedÌ65536Ö0
__wurÌ65536Ö0 __wurÌ65536Ö0
__x86_64Ì65536Ö0 __x86_64Ì65536Ö0
__x86_64__Ì65536Ö0 __x86_64__Ì65536Ö0
anon_enum_0Ì2Ö0 anon_enum_4Ì2Ö0
anon_enum_2Ì2Ö0 anon_struct_0Ì2048Ö0
anon_struct_1Ì2048Ö0 anon_struct_1Ì2048Ö0
anon_struct_10Ì2048Ö0
anon_struct_2Ì2048Ö0
anon_struct_3Ì2048Ö0
anon_struct_5Ì2048Ö0
anon_struct_7Ì2048Ö0
anon_struct_8Ì2048Ö0
anon_struct_9Ì2048Ö0
anon_union_6Ì8192Îanon_struct_5Ö0
bCharFormatÌ64Îanon_struct_9Ö0Ïuint8_t
bDataBitsÌ64Îanon_struct_9Ö0Ïuint8_t
bDescriptorTypeÌ64ÎUSB_StringManufacturingDescriptorÖ0Ïuint8_t
bDescriptorTypeÌ64ÎUSB_StringProdDescriptorÖ0Ïuint8_t
bDescriptorTypeÌ64ÎUSB_StringSerialDescriptorÖ0Ïuint8_t
bLengthÌ64ÎUSB_StringManufacturingDescriptorÖ0Ïuint8_t
bLengthÌ64ÎUSB_StringProdDescriptorÖ0Ïuint8_t
bLengthÌ64ÎUSB_StringSerialDescriptorÖ0Ïuint8_t
bNotificationTypeÌ64Îanon_struct_10Ö0Ïuint8_t
bParityTypeÌ64Îanon_struct_9Ö0Ïuint8_t
bRequestÌ64Îanon_struct_7Ö0Ïuint8_t
bStringÌ64ÎUSB_StringManufacturingDescriptorÖ0Ïwchar_t
bStringÌ64ÎUSB_StringProdDescriptorÖ0Ïwchar_t
bStringÌ64ÎUSB_StringSerialDescriptorÖ0Ïwchar_t
bmRequestTypeÌ64Îanon_struct_10Ö0Ïuint8_t
bmRequestTypeÌ64Îanon_struct_7Ö0Ïuint8_t
break_handlerÌ16Í()Ö0Ïvoid
break_handlerÌ1024Í()Ö0Ïvoid
bufferÌ16384Ö0Ïuint8_t
bufovrÌ16384Ö0Ïint bufovrÌ16384Ö0Ïint
bufovrÌ32768Ö0Ïint bufovrÌ32768Ö0Ïint
can_procÌ16Í()Ö0Ïvoid can_procÌ16Í()Ö0Ïvoid
@ -4375,27 +4734,47 @@ can_send_dummy
can_send_dummyÌ1024Í()Ö0Ïvoid can_send_dummyÌ1024Í()Ö0Ïvoid
can_statusÌ16384Ö0ÏCAN_status can_statusÌ16384Ö0ÏCAN_status
cec_can_isrÌ16Í()Ö0Ïvoid cec_can_isrÌ16Í()Ö0Ïvoid
dataÌ64Îanon_struct_1Ö0Ïuint8_t clstate_handlerÌ16Í(__attribute__((unused)) uint16_t val)Ö0Ïvoid
datalenÌ16384Ö0Ïint clstate_handlerÌ1024Í(uint16_t val)Ö0Ïvoid
config_pack_tÌ4096Ö0Ïanon_struct_7
dataÌ64Îanon_struct_3Ö0Ïuint8_t
dlenÌ16384Ö0Ïint dlenÌ16384Ö0Ïint
dma1_channel2_3_isrÌ16Í()Ö0Ïvoid dma1_channel2_3_isrÌ16Í()Ö0Ïvoid
dwDTERateÌ64Îanon_struct_9Ö0Ïuint32_t
endpointsÌ16384Ö0Ïep_t
ep0databufÌ16384Ö0Ïuint8_t
ep0dbuflenÌ16384Ö0Ïuint8_t
ep_tÌ4096Ö0Ï__ep_t
first_free_idxÌ16384Ö0Ïuint8_t first_free_idxÌ16384Ö0Ïuint8_t
first_nonfree_idxÌ16384Ö0Ïint8_t first_nonfree_idxÌ16384Ö0Ïint8_t
funcÌ1024Í()Î__ep_tÖ0Ïuint16_t
getCANIDÌ16Í()Ö0Ïuint16_t getCANIDÌ16Í()Ö0Ïuint16_t
getCANIDÌ1024Í()Ö0Ïuint16_t getCANIDÌ1024Í()Ö0Ïuint16_t
getLineCodingÌ16Í()Ö0Ïusb_LineCoding
getLineCodingÌ1024Í()Ö0Ïusb_LineCoding
gpio_setupÌ16Í(void)Ö0Ïvoid gpio_setupÌ16Í(void)Ö0Ïvoid
gpio_setupÌ1024Í(void)Ö0Ïvoid gpio_setupÌ1024Í(void)Ö0Ïvoid
hexdumpÌ16Í(uint8_t *arr, uint16_t len)Ö0Ïvoid
hexdumpÌ1024Í(uint8_t *arr, uint16_t len)Ö0Ïvoid
idatalenÌ16384Ö0Ïvolatile int
iwdg_setupÌ16Í()Ö0Ïvoid iwdg_setupÌ16Í()Ö0Ïvoid
last_err_codeÌ16384Ö0Ïuint32_t last_err_codeÌ16384Ö0Ïuint32_t
lengthÌ64Îanon_struct_1Ö0Ïuint8_t lenÌ16384Ö0Ïuint8_t
lengthÌ64Îanon_struct_3Ö0Ïuint8_t
lineCodingÌ16384Ö0Ïusb_LineCoding
linecoding_handlerÌ16Í(__attribute__((unused)) usb_LineCoding *lc)Ö0Ïvoid
linecoding_handlerÌ1024Í(usb_LineCoding *lc)Ö0Ïvoid
linerdyÌ16384Ö0Ïvolatile int linerdyÌ16384Ö0Ïvolatile int
linerdyÌ32768Ö0Ïvolatile int linerdyÌ32768Ö0Ïvolatile int
linuxÌ65536Ö0 linuxÌ65536Ö0
locale_tÌ4096Ö0Ï__locale_t
mainÌ16Í(void)Ö0Ïint mainÌ16Í(void)Ö0Ïint
mbstate_tÌ4096Ö0Ï__mbstate_t
messagesÌ16384Ö0ÏCAN_message messagesÌ16384Ö0ÏCAN_message
newlineÌ16Í()Ö0Ïvoid newlineÌ16Í()Ö0Ïvoid
newlineÌ1024Í()Ö0Ïvoid newlineÌ1024Í()Ö0Ïvoid
nopÌ131072Í()Ö0 nopÌ131072Í()Ö0
odatalenÌ16384Ö0Ïvolatile int
pin_clearÌ131072Í(gpioport,gpios)Ö0 pin_clearÌ131072Í(gpioport,gpios)Ö0
pin_readÌ131072Í(gpioport,gpios)Ö0 pin_readÌ131072Í(gpioport,gpios)Ö0
pin_setÌ131072Í(gpioport,gpios)Ö0 pin_setÌ131072Í(gpioport,gpios)Ö0
@ -4407,14 +4786,29 @@ printuhex
printuhexÌ1024Í(uint32_t val)Ö0Ïvoid printuhexÌ1024Í(uint32_t val)Ö0Ïvoid
rbufÌ16384Ö0Ïchar rbufÌ16384Ö0Ïchar
rbufnoÌ16384Ö0Ïint rbufnoÌ16384Ö0Ïint
rcvflagÌ16384Ö0Ïuint8_t
readCANIDÌ16Í()Ö0Ïvoid readCANIDÌ16Í()Ö0Ïvoid
readCANIDÌ1024Í()Ö0Ïvoid readCANIDÌ1024Í()Ö0Ïvoid
recvdataÌ16384Ö0Ïchar * recvdataÌ16384Ö0Ïchar *
rx_bufÌ64Î__ep_tÖ0Ïuint8_t *
rx_cntÌ64Î__ep_tÖ0
rx_flagÌ64Î__ep_tÖ0
setlinecodingÌ16384Ö0Ïuint8_t
setlinecodingÌ32768Ö0Ïuint8_t
setup_flagÌ64Î__ep_tÖ0
setup_packetÌ16384Ö0Ïconfig_pack_t
size_tÌ4096Ö0Ïlong unsigned int
statusÌ64Î__ep_tÖ0Ïuint16_t
strdupaÌ131072Í(s)Ö0 strdupaÌ131072Í(s)Ö0
strndupaÌ131072Í(s,n)Ö0 strndupaÌ131072Í(s,n)Ö0
sys_tick_handlerÌ16Í(void)Ö0Ïvoid sys_tick_handlerÌ16Í(void)Ö0Ïvoid
sysresetÌ16Í(void)Ö0Ïinline void sysresetÌ16Í(void)Ö0Ïinline void
tbufÌ16384Ö0Ïchar tbufÌ16384Ö0Ïchar
tbufnoÌ16384Ö0Ïint
transmit_tbufÌ16Í()Ö0Ïvoid
transmit_tbufÌ1024Í()Ö0Ïvoid
tx_bufÌ64Î__ep_tÖ0Ïuint16_t *
tx_flagÌ64Î__ep_tÖ0
txrdyÌ16384Ö0Ïint txrdyÌ16384Ö0Ïint
txrdyÌ32768Ö0Ïint txrdyÌ32768Ö0Ïint
unixÌ65536Ö0 unixÌ65536Ö0
@ -4423,11 +4817,24 @@ usart_getline
usart_getlineÌ1024Í(char **line)Ö0Ïint usart_getlineÌ1024Í(char **line)Ö0Ïint
usart_putcharÌ16Í(const char ch)Ö0Ïvoid usart_putcharÌ16Í(const char ch)Ö0Ïvoid
usart_putcharÌ1024Í(const char ch)Ö0Ïvoid usart_putcharÌ1024Í(const char ch)Ö0Ïvoid
usart_sendÌ16Í(const char *str, int len)Ö0ÏTXstatus usart_sendÌ16Í(const char *str)Ö0Ïvoid
usart_sendÌ1024Í(const char *str, int len)Ö0ÏTXstatus usart_sendÌ1024Í(const char *str)Ö0Ïvoid
usart_send_blockingÌ16Í(const char *str, int len)Ö0ÏTXstatus
usart_send_blockingÌ1024Í(const char *str, int len)Ö0ÏTXstatus
usart_setupÌ16Í()Ö0Ïvoid usart_setupÌ16Í()Ö0Ïvoid
usart_setupÌ1024Í()Ö0Ïvoid usart_setupÌ1024Í()Ö0Ïvoid
usartovrÌ131072Í()Ö0 usartovrÌ131072Í()Ö0
usartrxÌ131072Í()Ö0 usartrxÌ131072Í()Ö0
usb_LineCodingÌ4096Ö0Ïanon_struct_9
usb_cdc_notificationÌ4096Ö0Ïanon_struct_10
usb_dev_tÌ4096Ö0Ïanon_struct_8
usb_isrÌ16Í()Ö0Ïvoid
usb_procÌ16Í()Ö0Ïvoid
usb_procÌ1024Í()Ö0Ïvoid
vendor_handlerÌ16Í(config_pack_t *packet)Ö0Ïvoid
vendor_handlerÌ1024Í(config_pack_t *packet)Ö0Ïvoid
wIndexÌ64Îanon_struct_10Ö0Ïuint16_t
wIndexÌ64Îanon_struct_7Ö0Ïuint16_t
wLengthÌ64Îanon_struct_10Ö0Ïuint16_t
wLengthÌ64Îanon_struct_7Ö0Ïuint16_t
wValueÌ64Îanon_struct_10Ö0Ïuint16_t
wValueÌ64Îanon_struct_7Ö0Ïuint16_t
wint_tÌ4096Ö0Ïunsigned int