45volatile uint32_t
ADC1_BUF[ADC1_CHANNELS] = {0};
46extern ADC_HandleTypeDef
hadc1;
49volatile uint32_t
ADC2_BUF[ADC2_CHANNELS] = {0};
50extern ADC_HandleTypeDef
hadc2;
53volatile uint32_t
ADC3_BUF[ADC3_CHANNELS] = {0};
54extern ADC_HandleTypeDef
hadc3;
62 if(hadc == &VSENSE_HADC)
71 c->adcUpd(buf,chans,hadc);
86 c->timerElapsed(htim);
101 c->uartRxComplete(huart);
107 c->uartTxComplete(huart);
117 for(uint8_t i = 0; i < HAL_CAN_GetRxFifoFillLevel(hcan, CAN_RX_FIFO0); i++){
119 CAN_RxHeaderTypeDef canRxHeader;
120 if(HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &canRxHeader, msg.
data) == HAL_OK){
124 c->canRxPendCallback(portInst,msg);
131 for(uint8_t i = 0; i < HAL_CAN_GetRxFifoFillLevel(hcan, CAN_RX_FIFO1); i++){
133 CAN_RxHeaderTypeDef canRxHeader;
134 if(HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO1, &canRxHeader, msg.
data) == HAL_OK){
138 c->canRxPendCallback(portInst,msg);
212 c->SpiTxRxCplt(hspi);
218 c->SpiTxHalfCplt(hspi);
224 c->SpiRxHalfCplt(hspi);
230 c->SpiTxRxHalfCplt(hspi);
320 if(report_id == HID_ID_HIDCMD){
386 *chans = ADC1_CHANNELS;
393 *chans = ADC2_CHANNELS;
400 *chans = ADC3_CHANNELS;
409 HAL_ADC_Start_DMA(&
hadc1, (uint32_t*)
ADC1_BUF, ADC1_CHANNELS);
412 HAL_ADC_Start_DMA(&
hadc2, (uint32_t*)
ADC2_BUF, ADC2_CHANNELS);
415 HAL_ADC_Start_DMA(&
hadc3, (uint32_t*)
ADC3_BUF, ADC3_CHANNELS);
static std::vector< AdcHandler * > adcHandlers
static CANPort * handleToPort(void *handle)
static void cdcFinished(uint8_t itf=0)
static std::vector< CanHandler * > & getCANHandlers()
static std::vector< ExtiHandler * > extiHandlers
virtual void cdcRcvReady(uint8_t itf)
virtual void usbSuspend()
void transferComplete(uint8_t itf, uint8_t const *report, uint8_t len)
void hidCmdCallback(HID_CMD_Data_t *data)
static HID_CommandInterface * globalInterface
static std::vector< I2CHandler * > & getI2CHandlers()
virtual void midiRx(uint8_t itf, uint8_t packet[4])
static std::vector< SpiHandler * > & getSPIHandlers()
static std::vector< TimerHandler * > timerHandlers
virtual const uint8_t * getUsbDeviceDesc()
virtual const uint8_t * getUsbConfigurationDesc(uint8_t index)
virtual uint16_t * getUsbStringDesc(uint8_t index, uint16_t langid)
static std::vector< UartHandler * > & getUARTHandlers()
virtual uint16_t hidGet(uint8_t report_id, hid_report_type_t report_type, uint8_t *buffer, uint16_t reqlen)
static UsbHidHandler * globalHidHandler
virtual void hidOut(uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize)
void transferComplete(uint8_t itf, uint8_t const *report, uint8_t len)
static const uint8_t * getHidDesc()
volatile uint32_t * getAnalogBuffer(ADC_HandleTypeDef *hadc, uint8_t *chans)
void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
void HAL_CAN_RxFifo1FullCallback(CAN_HandleTypeDef *hcan)
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi)
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
uint16_t const * tud_descriptor_string_cb(uint8_t index, uint16_t langid)
void HAL_CAN_TxMailbox1AbortCallback(CAN_HandleTypeDef *hcan)
void tud_cdc_tx_complete_cb(uint8_t itf)
uint8_t const * tud_descriptor_device_cb(void)
void HAL_CAN_RxFifo0FullCallback(CAN_HandleTypeDef *hcan)
void HAL_CAN_TxMailbox2CompleteCallback(CAN_HandleTypeDef *hcan)
void tud_midi_rx_cb(uint8_t itf)
void HAL_CAN_TxMailbox2AbortCallback(CAN_HandleTypeDef *hcan)
void tud_hid_report_complete_cb(uint8_t itf, uint8_t const *report, uint8_t len)
void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const *buffer, uint16_t bufsize)
void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi)
void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi)
void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c)
uint8_t const * tud_hid_descriptor_report_cb(uint8_t itf)
void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c)
void HAL_TIM_PeriodElapsedCallback_CPP(TIM_HandleTypeDef *htim)
void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan)
uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t *buffer, uint16_t reqlen)
void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan)
void HAL_CAN_TxMailbox0CompleteCallback(CAN_HandleTypeDef *hcan)
volatile uint32_t ADC1_BUF[ADC1_CHANNELS]
MidiHandler * midihandler
volatile uint32_t ADC3_BUF[ADC3_CHANNELS]
void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c)
void tud_cdc_rx_cb(uint8_t itf)
void HAL_SPI_TxHalfCpltCallback(SPI_HandleTypeDef *hspi)
void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c)
void HAL_CAN_TxMailbox0AbortCallback(CAN_HandleTypeDef *hcan)
void HAL_SPI_TxRxHalfCpltCallback(SPI_HandleTypeDef *hspi)
uint8_t const * tud_descriptor_configuration_cb(uint8_t index)
__weak void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c)
void HAL_SPI_RxHalfCpltCallback(SPI_HandleTypeDef *hspi)
volatile uint32_t ADC2_BUF[ADC2_CHANNELS]
void HAL_CAN_TxMailbox1CompleteCallback(CAN_HandleTypeDef *hcan)
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc)
void HAL_CAN_RxFifo1MsgPendingCallback(CAN_HandleTypeDef *hcan)
hid_report_type_t
HID Request Report Type.
@ HID_REPORT_TYPE_INVALID
@ HID_REPORT_TYPE_OUTPUT
Output.
bool tud_midi_n_packet_read(uint8_t itf, uint8_t packet[4])
uint8_t data[CAN_MSGBUFSIZE]