Compare commits

...

5 Commits

Author SHA1 Message Date
nzasch
7659060d18 tx adc opamp 2022-02-07 02:08:56 +01:00
nzasch
c666acc12c tx adc opamp 2022-02-07 02:07:11 +01:00
nzasch
4db3b6246d tx adc opamp 2022-02-07 02:02:36 +01:00
nzasch
74bf3e5019 tx modulator 2022-02-06 17:40:53 +01:00
nzasch
d66653ecdc tx modulator 2022-02-06 17:40:36 +01:00
226 changed files with 22230 additions and 440084 deletions

File diff suppressed because one or more lines are too long

View File

@@ -5,42 +5,19 @@
#include "rx.h"
#include "tx.h"
/*
#define TX_TYPE_NONE 0
#define TX_TYPE_DAC 1
#define TX_TYPE_PWM 2
#define TX_TYPE_SI5351 3
// #define TX_TYPE TX_TYPE_SI5351
#define TX_TYPE TX_TYPE_NONE
*/
#define IF_TYPE_NOIF 0 // la frequenza del dac o del dds e' pari alla frequenza impostata
#define IF_TYPE_LOMIX 1
#define IF_TYPE IF_TYPE_NOIF
#define IF_TYPE IF_TYPE_LOMIX
#define LO_TYPE_FIX 0
#define LO_TYPE_SI5351 1
#define LO_TYPE LO_TYPE_SI5351
#define LO_TYPE_FIX_FREQ 0 // frequenza di LO
#define LO_FREQ 125000 // frequenza di LO
#define CLOCK (168000000UL)
/*
// RX ADC
#define ADC_CLOCK (700000L) // (168000000/((47,5+12,5)*4)
#define ADC_OVERSAMPLING (2)
#define ADC_SAMPLE_RATE (ADC_CLOCK/ADC_OVERSAMPLING)
#define ADC_BUFFER_SIZE (1024)
#define ADC_SAMPLES_BUFFER_RATE (ADC_SAMPLE_RATE/ADC_BUFFER_SIZE)
*/
/*
// TX DAC
#define TX_DAC_SAMPLE_RATE (CLOCK/480)
#define TX_DAC_BUFFER_SIZE (1024)
#define TX_DAC_BUFFER_RATE (TX_DAC_SAMPLE_RATE/TX_DAC_BUFFER_SIZE)
*/
#define NCO2_INCREMENT (343597383L)
#define MOD_DC 0
#define MOD_LSB 1
@@ -54,12 +31,6 @@
#define STATUS_TX 1
#define STATUS_SQ 2
/*
// === DAC ===
#define RX_DAC_DIVISOR 7680
#define RX_DAC_SAMPLE_RATE (CLOCK/RX_DAC_DIVISOR)
*/
// === UART ===
#define RX_CMD_RB_SIZE (32)
#define RX_CMD_RB_SIZE_MASK (RX_CMD_RB_SIZE - 1)
@@ -73,6 +44,9 @@ struct __attribute__((__packed__)) s_stato {
uint8_t guadagno_rx;
uint8_t guadagno_mic;
uint8_t canale;
uint16_t tx_f_freq;
uint16_t tx_f_banda;
uint8_t tx_f_beta;
};
struct __attribute__((__packed__)) s_canale {
@@ -82,7 +56,7 @@ struct __attribute__((__packed__)) s_canale {
uint8_t modulazione;
int16_t rit;
uint16_t rx_f_freq;
uint16_t rx_f_bw;
uint16_t rx_f_banda;
uint8_t rx_f_beta;
};
@@ -94,7 +68,7 @@ struct __attribute__((__packed__)) s_banda {
// volatili
extern uint8_t receive, transmit;
extern uint8_t ricezione, trasmissione;
extern q31_t nco1_increment;
// extern uint16_t pwm_tx_period;
extern int32_t peak, peakset;
@@ -105,20 +79,15 @@ extern uint8_t scrittura_stato_pendente;
// canale
extern struct s_canale canale;
extern uint32_t frequency;
extern int32_t rit;
extern uint32_t audio_filter_freq, audio_filter_bw, audio_filter_beta;
// extern int32_t modulation;
// stato
extern struct s_stato stato;
extern int32_t squelch;
extern int32_t rx_gain;
extern int32_t mic_gain;
//extern int32_t volume;
// extern char tabstring[15];
extern CORDIC_HandleTypeDef hcordic;
@@ -130,31 +99,18 @@ extern uint8_t rx_cmd_rb_in_idx, rx_cmd_rb_out_idx;
extern char uart_tx_buf[UART_TX_BUFFER_SIZE];
extern uint16_t uart_tx_buf_in_idx;
// rx adc
extern uint16_t adc_buffer[RX_ADC_BUFFER_SIZE];
// tx dac
extern q31_t tx_dac_buffer[2][TX_DAC_BUFFER_SIZE];
extern volatile uint8_t half_tx_dac_buffer_empty, tx_dac_buffer_toggle;
extern q31_t if_I[LF_BUFFER_SIZE];
extern q31_t if_Q[LF_BUFFER_SIZE];
// RX DAC
extern uint8_t lf_buffer_toggle;
extern q31_t prefilter_lf_buffer[LF_BUFFER_SIZE];
extern q31_t lf_buffer[2][LF_BUFFER_SIZE];
// extern q31_t lf_buffer_test[2][LF_BUFFER_SIZE];
extern q31_t if_I[RX_DAC_BUFFER_SIZE];
extern q31_t if_Q[RX_DAC_BUFFER_SIZE];
// ======== FUNZIONI ========
void enqueue_cmd(char in);
void state_set_default(void);
void start_transmit(void);
void stop_transmit(void);
void start_receive(void);
void stop_receive(void);
void start_trasmissione(void);
void stop_trasmissione(void);
void start_ricezione(void);
void stop_ricezione(void);
void set_rx_gain(void);
@@ -170,10 +126,7 @@ uint8_t get_changed(uint8_t state);
uint16_t ringbuf_increment(uint8_t *index, uint8_t buff_size_mask);
q31_t sat_mult_q31(q31_t a, q31_t b);
// diag
// diag
void diag(void);
// uint32_t get_pwm_freq(uint16_t pwm_period);
// uint16_t get_pwm_period(uint32_t pwm_frequency);
uint8_t measure_log_abs_mean(q31_t *samples, uint16_t size);

View File

@@ -1,27 +1,28 @@
#include <stdint.h>
#define EEPROM_INDIRIZZO_I2C 80
#define EEPROM_INDIRIZZO_I2C 160
#define EEPROM_DIMENSIONE_IN_BYTE 4096
#define EEPROM_BYTES_PER_PAGINA 32
#define EEPROM_DIMENSIONE_PAGINA (EEPROM_DIMENSIONE_IN_BYTE/EEPROM_BYTES_PER_PAGINA)
// tutti in pagine di 32byte
#define EEPROM_OFFSET_CANALE 0
#define EEPROM_NUMERO_CANALI 100
#define EEPROM_OFFSET_CANALE 0
#define EEPROM_NUMERO_CANALI 100
#define EEPROM_NUMERO_CANALE_DEFAULT 0
#define EEPROM_OFFSET_BANDA 100
#define EEPROM_NUMERO_BANDE 20
#define EEPROM_OFFSET_BANDA 100
#define EEPROM_NUMERO_BANDE 20
#define EEPROM_INDIRIZZO_STATO 121
#define EEPROM_INDIRIZZO_STATO 121
extern I2C_HandleTypeDef hi2c1;
// funzioni
void i2c_eeprom_scrivi_32byte(uint16_t indirizzo, uint8_t * dati);
void i2c_eeprom_leggi_32byte(uint16_t indirizzo, uint8_t * dati);
void i2c_eeprom_scrivi_pagina(uint16_t indirizzo, uint8_t * dati);
uint8_t i2c_eeprom_leggi_pagina(uint16_t indirizzo, uint8_t * dati);
void salva_canale(uint8_t numero);
void leggi_canale(uint8_t numero);

View File

@@ -29,7 +29,7 @@
#define TYP_INT 0
#define TYP_FLOAT 1
#define TYP_ALPHA 2
#define TYP_ALPHANUM 2
#define TYP_LIST 3
#define TYP_NED 4
#define TYP_HID 5
@@ -37,9 +37,9 @@
#define MENU_PAGE_SOM 0
#define MENU_PAGE_DEFAULT 0
#define MENU_PAGE_AUDIO 1
#define MENU_PAGE_EOM 1
#define MENU_PAGE_MEM 2
#define MENU_PAGE_EOM 2
#define MENU_PAGE_ALL 255
#define SAT 0
@@ -108,8 +108,6 @@ void print_modulation(uint8_t item_idx);
void print_bar(uint8_t item_idx);
void print_frequency(uint8_t item_idx);
char * valToStr(uint32_t val, char *buf, uint8_t bufSize, char sepChar);
uint8_t sat_subu8b(uint8_t x, uint8_t y);
void menu_item_up(void);
void menu_item_down(void);

View File

@@ -63,18 +63,10 @@ void Error_Handler(void);
#define NC1_GPIO_Port GPIOA
#define NC2_Pin GPIO_PIN_2
#define NC2_GPIO_Port GPIOA
#define GPIO5_Pin GPIO_PIN_6
#define GPIO5_GPIO_Port GPIOA
#define GPIO4_Pin GPIO_PIN_0
#define GPIO4_GPIO_Port GPIOB
#define T_SWDIO_Pin GPIO_PIN_13
#define T_SWDIO_GPIO_Port GPIOA
#define T_SWCLK_Pin GPIO_PIN_14
#define T_SWCLK_GPIO_Port GPIOA
#define GPIO3_Pin GPIO_PIN_3
#define GPIO3_GPIO_Port GPIOB
#define GPIO2_Pin GPIO_PIN_4
#define GPIO2_GPIO_Port GPIOB
#define GPIO1_Pin GPIO_PIN_5
#define GPIO1_GPIO_Port GPIOB
#define PTT_Pin GPIO_PIN_6

View File

@@ -35,7 +35,7 @@
#define ST2_FILTER_BLOCK_SIZE (ST2_BUFFER_SIZE)
#define ST2_FILTER_TAP_NUM (128)
#define LF_BUFFER_SIZE (ST2_BUFFER_SIZE/ST2_DECIMATION_FACTOR)
#define RX_DAC_BUFFER_SIZE (ST2_BUFFER_SIZE/ST2_DECIMATION_FACTOR)
// audio filter
#define RX_AUDIO_FILTER_TAP_NUM 128
@@ -44,17 +44,25 @@
#define RX_AUDIO_FILTER_BW_DEF (2000)
#define RX_AUDIO_FILTER_BW_MAX (RX_DAC_SAMPLE_RATE/2)
#define RX_AUDIO_FILTER_BETA_DEF (16)
#define RX_AUDIO_FILTER_BLOCK_SIZE LF_BUFFER_SIZE
#define RX_AUDIO_FILTER_BLOCK_SIZE RX_DAC_BUFFER_SIZE
// demodulatore
#define NCO2_INCREMENT (343597383L)
#define NCO2_FREQUENCY (RX_DAC_SAMPLE_RATE/((0xFFFFFFFF)/NCO2_INCREMENT)) // 1750
#define RX_NCO_FREQUENCY (RX_DAC_SAMPLE_RATE/((0xFFFFFFFF)/NCO2_INCREMENT)) // 1750
#define RX_SMETER_SCALE 4
extern uint8_t rx_signal, rx_signal_last;
extern q31_t rx_nco1_increment;
// RX ADC
extern volatile uint8_t rx_adc_buffer_ready;
extern uint16_t rx_adc_buffer[RX_ADC_BUFFER_SIZE];
// RX DAC
extern volatile uint8_t rx_dac_buffer_toggle, rx_dac_buffer_mezzo_vuoto;
extern q31_t prefilter_rx_dac_buffer[RX_DAC_BUFFER_SIZE];
extern q31_t rx_dac_buffer[2][RX_DAC_BUFFER_SIZE];
// filtro st2
extern arm_fir_decimate_instance_q31 st2_filter_I_struct;
extern arm_fir_decimate_instance_q31 st2_filter_Q_struct;
@@ -80,7 +88,7 @@ void am_demodulator(q31_t *in_I, q31_t *in_Q, uint16_t size, q31_t *out);
// void filter_init(void);
void set_rx_audio_filter(void);
void st2_filter_init(void);
void audio_filter_init(void);
void rx_inizializza_filtro_audio(void);
void audio_filter_generate_coeffs(int32_t *Coeffs, uint32_t freq, uint32_t bw, uint8_t beta);
q31_t hb_fir15(q31_t * samples_ringbuf, uint8_t sample_index, uint8_t buff_size_mask, q31_t * coefficients);

View File

@@ -28,7 +28,9 @@
extern I2C_HandleTypeDef hi2c1;
void si53531_initialize(void);
void si53531_set_frequency(uint32_t freq, uint8_t synth);
void si5351_off(void);
void si5351_on(void);
void si5351_initialize(void);
void si5351_set_frequency(uint32_t freq, uint8_t pll);
void si5351_off_clk(uint8_t clk);
void si5351_on_clk(uint8_t clk);
extern uint8_t oeb;

View File

@@ -58,9 +58,11 @@ void PendSV_Handler(void);
void SysTick_Handler(void);
void DMA1_Channel1_IRQHandler(void);
void DMA1_Channel2_IRQHandler(void);
void DMA1_Channel3_IRQHandler(void);
void DMA1_Channel4_IRQHandler(void);
void DMA1_Channel5_IRQHandler(void);
void ADC1_2_IRQHandler(void);
void USB_LP_IRQHandler(void);
void USART1_IRQHandler(void);
void TIM7_IRQHandler(void);
/* USER CODE BEGIN EFP */

View File

@@ -9,44 +9,100 @@
#define TX_TYPE_NONE 0
#define TX_TYPE_DAC 1
// #define TX_TYPE_PWM 2
#define TX_TYPE_SI5351 3
#define TX_TYPE TX_TYPE_SI5351
// #define TX_TYPE TX_TYPE_NONE
#define TX_AUDIO_FILTER_INTERPOLATION_FACTOR (16)
#define TX_AUDIO_FILTER_BLOCK_SIZE (1024)
#define TX_AUDIO_FILTER_TAP_NUM (128)
// #define TX_TYPE TX_TYPE_SI5351
#define TX_TYPE TX_TYPE_DAC
// TX DAC
#define TX_DAC_SAMPLE_RATE (CLOCK/480)
#define TX_DAC_BUFFER_SIZE (1024)
#define TX_DAC_BUFFER_RATE (TX_DAC_SAMPLE_RATE/TX_DAC_BUFFER_SIZE)
// TX ADC
#define TX_ADC_DIVISOR 7680
#define TX_ADC_SAMPLE_RATE (CLOCK/TX_ADC_DIVISOR) // 21875
#define TX_ADC_DIMENSIONE_BUFFER (64)
#define TX_ADC_BUFFER_RATE (TX_ADC_SAMPLE_RATE/TX_ADC_DIMENSIONE_BUFFER)
// TX IF
/*
#define TX_AUDIO_FILTER_INTERPOLATION_FACTOR (16)
#define TX_AUDIO_FILTER_BLOCK_SIZE (1024)
#define TX_AUDIO_FILTER_TAP_NUM (128)
*/
#define TX_FILTRO_AUDIO_FATTORE_INTERPOLAZIONE (16)
#define TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO (64)
#define TX_FILTRO_AUDIO_NUMERO_TAP (128)
// filtro audio
#define TX_FILTRO_AUDIO_TAP_NUM 128
#define TX_FILTRO_AUDIO_FREQ_DEF (1250)
#define TX_FILTRO_AUDIO_FREQ_MAX (TX_DAC_SAMPLE_RATE/2)
#define TX_FILTRO_AUDIO_BANDA_DEF (2000)
#define TX_FILTRO_AUDIO_BANDA_MAX (TX_DAC_SAMPLE_RATE/2)
#define TX_FILTRO_AUDIO_BETA_DEF (16)
#define TX_FILTRO_AUDIO_BLOCK_SIZE TX_DAC_BUFFER_SIZE
#define TX_FILTRO_RF_FATTORE_INTERPOLAZIONE (16)
#define TX_FILTRO_RF_DIMENSIONE_BLOCCO (1024)
#define TX_FILTRO_RF_NUMERO_TAP (128)
// TX DAC
#define TX_DAC_SAMPLE_RATE (CLOCK/480) // 350000
#define TX_DAC_BUFFER_SIZE (1024)
#define TX_DAC_BUFFER_RATE (TX_DAC_SAMPLE_RATE/TX_DAC_BUFFER_SIZE) // 341,796
#define TX_NCO_FREQUENCY (TX_ADC_SAMPLE_RATE/((0xFFFFFFFF)/NCO2_INCREMENT)) // 1750
#define TX_SMETER_SCALE 2
// variabili
extern uint8_t tx_signal, tx_signal_last;
extern q31_t tx_nco1_increment;
// buffer
extern volatile uint8_t half_tx_dac_buffer_empty, tx_dac_buffer_toggle;
extern volatile uint8_t tx_adc_buffer_ready;
// TX ADC
extern volatile uint8_t tx_adc_buffer_pronto;
extern uint16_t tx_adc_buffer[TX_ADC_DIMENSIONE_BUFFER];
// TX filtro audio
extern arm_fir_instance_q31 tx_filtro_audio_struttura;
extern q31_t tx_filtro_audio_stato[TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO + TX_FILTRO_AUDIO_NUMERO_TAP - 1];
extern int32_t tx_filtro_audio_coefficienti[TX_FILTRO_AUDIO_NUMERO_TAP];
// TX DAC
extern volatile uint8_t tx_dac_buffer_mezzo_vuoto, tx_dac_buffer_toggle;
extern q31_t tx_dac_buffer[2][TX_DAC_BUFFER_SIZE];
// TX IF
extern q31_t tx_I_buffer[TX_ADC_DIMENSIONE_BUFFER], tx_Q_buffer[TX_ADC_DIMENSIONE_BUFFER];
// funzioni
// filtro audio
extern void tx_filtra_audio(q31_t *out, uint16_t dimensione, uint16_t *in);
extern arm_fir_instance_q31 tx_audio_filter_I_struct, tx_audio_filter_Q_struct;
extern q31_t tx_audio_filter_I_state[TX_AUDIO_FILTER_BLOCK_SIZE + TX_AUDIO_FILTER_TAP_NUM - 1];
extern q31_t tx_audio_filter_Q_state[TX_AUDIO_FILTER_BLOCK_SIZE + TX_AUDIO_FILTER_TAP_NUM - 1];
extern int32_t tx_audio_filter_coeffs[TX_AUDIO_FILTER_TAP_NUM];
extern q31_t tx_audio_filter_I_state[TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO + TX_FILTRO_AUDIO_NUMERO_TAP - 1];
extern q31_t tx_audio_filter_Q_state[TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO + TX_FILTRO_AUDIO_NUMERO_TAP - 1];
extern int32_t tx_audio_filter_coeffs[TX_FILTRO_AUDIO_NUMERO_TAP];
// mixer
void tx_mixer(q31_t *out, uint16_t dimensione_out, q31_t *I_in, q31_t *Q_in, int32_t incremento_nco);
// modulatori
void ssb_modulator(q31_t *in_I, q31_t *in_Q, uint16_t size, q31_t *out, q31_t nco_freq);
void dc_modulator(q31_t *in, uint16_t size, q31_t *out);
void am_modulator(q31_t *in_I, q31_t *in_Q, uint16_t size, q31_t *out);
void modulatore_dc(q31_t *out_I, q31_t *out_Q, uint16_t dimensione, q31_t *in);
void modulatore_ssb(q31_t *out_I, q31_t *out_Q, uint16_t dimensione, q31_t *in, q31_t nco_freq);
void modulatore_am(q31_t *out_I, q31_t *out_Q, uint16_t dimensione, q31_t *in);
uint16_t u12_sine(void);
void generate_tone(q31_t *buffer, uint16_t buffer_size);
void genera_tono(q31_t *buffer, uint16_t buffer_dimensione);
void set_tx_nco1_freq(int32_t freq);
#endif

View File

@@ -34,24 +34,26 @@
onde lunghe e lunghissime.
*/
/*
TIM6 7680 -> 21875 Hz audio
TIM7 1680000 -> 100 Hz eventi
TIM8 240 -> 700000 Hz rf
*/
struct s_canale canale;
struct s_stato stato;
// state
uint8_t receive, transmit;
uint32_t frequency;
uint8_t ricezione, trasmissione;
int32_t rit;
// uint16_t pwm_tx_period;
// int32_t modulation;
int32_t rx_gain;
int32_t peak, peakset;
// int32_t volume;
int32_t squelch;
int32_t mic_gain;
int32_t scan;
q31_t nco1_increment;
// q31_t nco1_increment;
uint32_t audio_filter_freq, audio_filter_bw, audio_filter_beta;
// char tabstring[15];
uint8_t s_meter;
// maschera, ogni bit uno stato
@@ -67,32 +69,11 @@ uint8_t rx_cmd_rb_in_idx, rx_cmd_rb_out_idx;
char uart_tx_buf[UART_TX_BUFFER_SIZE];
uint16_t uart_tx_buf_in_idx;
// bufffah
uint16_t adc_buffer[RX_ADC_BUFFER_SIZE];
q31_t if_I[LF_BUFFER_SIZE];
q31_t if_Q[LF_BUFFER_SIZE];
// RX
uint8_t lf_buffer_toggle;
q31_t prefilter_lf_buffer[LF_BUFFER_SIZE];
q31_t lf_buffer[2][LF_BUFFER_SIZE];
// q31_t lf_buffer_test[2][LF_BUFFER_SIZE];
// TX
// volatile uint8_t half_tx_dac_buffer_empty, tx_dac_buffer_toggle;
q31_t tx_dac_buffer[2][TX_DAC_BUFFER_SIZE];
q31_t if_I[RX_DAC_BUFFER_SIZE];
q31_t if_Q[RX_DAC_BUFFER_SIZE];
// ============
int32_t set_nco1_freq(int32_t freq){
int64_t tmp_increment;
if(canale.modulazione == MOD_USB || canale.modulazione == MOD_CWU) freq += (NCO2_FREQUENCY);
else if(canale.modulazione == MOD_LSB || canale.modulazione == MOD_CWL) freq -= (NCO2_FREQUENCY);
tmp_increment = ((int64_t)freq * 0x100000000LL)/RX_ADC_SAMPLE_RATE;
return (int32_t)tmp_increment;
}
inline uint16_t ringbuf_increment(uint8_t *index, uint8_t buff_size_mask) {
(*index)++;
*index &= buff_size_mask;
@@ -128,23 +109,12 @@ void enqueue_tx(char * data, uint16_t len){
}
*/
// state changes
// cambio stati
void set_frequency(void){
rx_nco1_increment = set_nco1_freq(frequency+rit);
if(TX_TYPE == TX_TYPE_DAC){
tx_nco1_increment = set_nco1_freq(frequency);
}
else if(TX_TYPE == TX_TYPE_SI5351){
si53531_set_frequency(frequency, 0);
si53531_set_frequency(frequency, 1);
}
set_rx_nco1_freq(canale.frequenza+rit);
set_tx_nco1_freq(canale.frequenza);
}
/*
void set_filter(void){
audio_filter_generate_coeffs(audio_filter_coeffs, audio_filter_freq, audio_filter_bw, audio_filter_beta);
}
*/
void imposta_modulazione(void){
st2_filter_init();
// cambia offset
@@ -169,8 +139,8 @@ uint8_t get_changed(uint8_t state){
}
void state_set_default(void){
canale.modulazione = MOD_CWU;
frequency = 128000;
canale.modulazione = MOD_DC;
canale.frequenza = 128000;
rit = 0;
set_frequency();
rx_gain = 2;
@@ -179,6 +149,11 @@ void state_set_default(void){
audio_filter_bw = RX_AUDIO_FILTER_BW_DEF;
audio_filter_beta = RX_AUDIO_FILTER_BETA_DEF;
audio_filter_generate_coeffs(audio_filter_coeffs, audio_filter_freq, audio_filter_bw, audio_filter_beta);
stato.tx_f_freq = TX_FILTRO_AUDIO_FREQ_DEF;
stato.tx_f_banda = TX_FILTRO_AUDIO_BANDA_DEF;
stato.tx_f_beta = TX_FILTRO_AUDIO_BETA_DEF;
audio_filter_generate_coeffs(tx_filtro_audio_coefficienti, stato.tx_f_freq, stato.tx_f_banda, stato.tx_f_beta);
state_changed = 0xFFFF;
// strcpy(tabstring, "TX AUD MEM NO");
}
@@ -208,6 +183,7 @@ uint16_t get_pwm_period(uint32_t pwm_frequency){
}
*/
// misura il logaritmo binario della media dei valori assoluti in q31
uint8_t measure_log_abs_mean(q31_t *samples, uint16_t size){
int32_t measured_signal = 0;
uint16_t index = 0;

View File

@@ -5,32 +5,30 @@
// HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout)
void i2c_eeprom_scrivi_32byte(uint16_t indirizzo, uint8_t * dati){
void i2c_eeprom_scrivi_pagina(uint16_t indirizzo, uint8_t * dati){
while (HAL_I2C_IsDeviceReady(&hi2c1, (uint16_t)(EEPROM_INDIRIZZO_I2C), 3, 100) != HAL_OK) { }
HAL_I2C_Mem_Write(&hi2c1, (uint16_t)(EEPROM_INDIRIZZO_I2C), indirizzo, I2C_MEMADD_SIZE_16BIT, dati, 32, 100);
HAL_I2C_Mem_Write(&hi2c1, (uint16_t)(EEPROM_INDIRIZZO_I2C), indirizzo, I2C_MEMADD_SIZE_16BIT, dati, EEPROM_BYTES_PER_PAGINA, 100);
}
uint8_t i2c_eeprom_leggi_32byte(uint16_t indirizzo, uint8_t * dati){
HAL_StatusTypeDef status = HAL_OK;
uint8_t i2c_eeprom_leggi_pagina(uint16_t indirizzo, uint8_t * dati){
HAL_StatusTypeDef status = HAL_OK;
while (HAL_I2C_IsDeviceReady(&hi2c1, (uint16_t)(EEPROM_INDIRIZZO_I2C), 3, 100) != HAL_OK) { }
status = HAL_I2C_Mem_Read(&hi2c1, (uint16_t)(EEPROM_INDIRIZZO_I2C), indirizzo, I2C_MEMADD_SIZE_8BIT, dati, 32, 100);
status = HAL_I2C_Mem_Read(&hi2c1, (uint16_t)(EEPROM_INDIRIZZO_I2C), indirizzo, I2C_MEMADD_SIZE_8BIT, dati, EEPROM_BYTES_PER_PAGINA, 100);
return status;
}
void salva_canale(uint8_t numero){
i2c_eeprom_scrivi_32byte((EEPROM_OFFSET_CANALE + numero) * EEPROM_BYTES_PER_PAGINA, (uint8_t)&canale);
i2c_eeprom_scrivi_pagina((EEPROM_OFFSET_CANALE + numero) * EEPROM_BYTES_PER_PAGINA, (uint8_t)&canale);
}
void leggi_canale(uint8_t numero){
i2c_eeprom_leggi_32byte((EEPROM_OFFSET_CANALE + numero) * EEPROM_BYTES_PER_PAGINA, (uint8_t)&canale);
i2c_eeprom_leggi_pagina((EEPROM_OFFSET_CANALE + numero) * EEPROM_BYTES_PER_PAGINA, (uint8_t)&canale);
}
void salva_stato(void){
i2c_eeprom_scrivi_32byte(EEPROM_INDIRIZZO_STATO * EEPROM_BYTES_PER_PAGINA, (uint8_t)&stato);
i2c_eeprom_scrivi_pagina(EEPROM_INDIRIZZO_STATO * EEPROM_BYTES_PER_PAGINA, (uint8_t)&stato);
}
void leggi_stato(void){
i2c_eeprom_leggi_32byte(EEPROM_INDIRIZZO_STATO * EEPROM_BYTES_PER_PAGINA, (uint8_t)&stato);
i2c_eeprom_leggi_pagina(EEPROM_INDIRIZZO_STATO * EEPROM_BYTES_PER_PAGINA, (uint8_t)&stato);
}

View File

@@ -32,7 +32,7 @@ struct menu_item {
// name, type, size,row,col,step, min, max, wrap suffix *varptr, set_function_ptr print_function_ptr
struct menu_item items[] = {
{MENU_PAGE_DEFAULT, " Frequenza", TYP_INT, 9, 1, 0, 100, 1000, 1750000,WRAP, "", " Hz", &frequency, &set_frequency, &print_frequency},
{MENU_PAGE_DEFAULT, " Frequenza", TYP_INT, 9, 1, 0, 100, 1000, 1750000,WRAP, "", " Hz", &canale.frequenza, &set_frequency, &print_frequency},
// {MENU_PAGE_DEFAULT, " Rit ", TYP_INT, 4, 2, 0, 10, 0, 9999, SAT, "", "", &rit, &set_frequency, &print_frequency},
{MENU_PAGE_DEFAULT, " Volume ", TYP_INT, 5, 2, 0, 1, 0, 32, SAT, "", "|", &stato.volume, &set_dummy, &print_bar},
{MENU_PAGE_DEFAULT, " Guadagno ", TYP_INT, 1, 2, 7, 1, 1, 6, SAT, "", "x", &rx_gain, &set_rx_gain, &print_integer},
@@ -43,11 +43,15 @@ struct menu_item items[] = {
{MENU_PAGE_AUDIO, " Filtro BP ", TYP_INT, 4, 2, 0, 50, 50, 2500, SAT, "", " Hz", &audio_filter_bw, &set_rx_audio_filter, &print_integer},
{MENU_PAGE_AUDIO, " Filtro Q ", TYP_INT, 2, 3, 0, 1, 1, 32, SAT, "", " Q", &audio_filter_beta, &set_rx_audio_filter, &print_integer},
{MENU_PAGE_MEM, " Nome ", TYP_ALPHANUM, 14, 1, 0, 1, 0, 0, SAT, "", "",&audio_filter_beta, &set_dummy, &print_string},
{MENU_PAGE_MEM, " Numero ", TYP_ALPHANUM, 2, 2, 0, 1, 100, 100, SAT, "", "",canale.nome, &set_dummy, &print_string},
{MENU_PAGE_ALL, " Segnale ", TYP_NED, 13, 4, 0, 0, 0, 0, SAT, "S", "", &s_meter, &set_dummy, &print_bar},
{MENU_PAGE_ALL, " Tabs ", TYP_NED, 3, 5, 0, 0, 0, 0, SAT, "", "", "PTT", &set_dummy, &print_string},
{MENU_PAGE_ALL, " Tabs ", TYP_NED, 3, 5, 4, 0, 0, 0, SAT, "", "", "SET", &set_dummy, &print_string},
{MENU_PAGE_ALL, " Tabs ", TYP_NED, 2, 5, 9, 0, 0, 0, SAT, "", "", "BL", &set_dummy, &print_string},
{MENU_PAGE_ALL, " Tabs ", TYP_NED, 1, 5, 12, 0, 0, 0, SAT, "", "", "V/F", &set_dummy, &print_string},
{MENU_PAGE_ALL, " Tabs ", TYP_NED, 1, 5, 12, 0, 0, 0, SAT, "", "", "M", &set_dummy, &print_string},
};
/*
@@ -141,20 +145,24 @@ void decode_cmd(char cmd){
void encoder_increment(void){
if(items[menu_item].type == TYP_INT) integer_editor_up(menu_item);
else if(items[menu_item].type == TYP_ALPHANUM) string_editor_up(menu_item);
items[menu_item].set_function_ptr();
}
void encoder_decrement(void){
if(items[menu_item].type == TYP_INT) integer_editor_down(menu_item);
else if(items[menu_item].type == TYP_ALPHANUM) string_editor_down(menu_item);
items[menu_item].set_function_ptr();
}
void joystick_dx(void){
step_down(menu_item);
if(items[menu_item].type == TYP_INT) step_down(menu_item);
else if(items[menu_item].type == TYP_ALPHANUM) string_editor_destra(menu_item);
}
void joystick_sx(void){
step_up(menu_item);
if(items[menu_item].type == TYP_INT) step_up(menu_item);
else if(items[menu_item].type == TYP_ALPHANUM) string_editor_sinistra(menu_item);
}
void joystick_down(void){
@@ -284,6 +292,16 @@ void integer_editor_down(uint8_t mode){
set_changed(mode);
}
void string_editor_up(uint8_t mode){
}
void string_editor_down(uint8_t mode){
}
void string_editor_sinistra(uint8_t mode){
}
void string_editor_destra(uint8_t mode){
}
void list_editor_down(uint8_t mode){
}
@@ -295,8 +313,8 @@ void tabs_update(void){
void tab_up(uint8_t tab){
switch(tab){
case 0:
stop_receive();
start_transmit();
ferma_ricezione();
avvia_trasmissione();
break;
case 1:
menu_last_item[menu_page] = menu_item;
@@ -325,8 +343,8 @@ void tab_up(uint8_t tab){
void tab_down(uint8_t tab){
switch(tab){
case 0:
stop_transmit();
start_receive();
ferma_trasmissione();
avvia_ricezione();
break;
case 2:
display_backlight_off();
@@ -346,7 +364,7 @@ void display_init(void){
uart_tx_buf_in_idx += sprintf(uart_tx_buf+uart_tx_buf_in_idx,"\x1B[133,127,127,127,127,127,127c");
uart_tx_buf_in_idx += sprintf(uart_tx_buf+uart_tx_buf_in_idx,"\x1B[%ds",DISPLAY_STANDBY_TIMER);
uart_tx_buf_in_idx += sprintf(uart_tx_buf+uart_tx_buf_in_idx,"\x1B[150,100q");
// uart_tx_buf_in_idx += sprintf(uart_tx_buf+uart_tx_buf_in_idx,"\x1B[150,100q");
uart_tx_buf_in_idx += sprintf(uart_tx_buf+uart_tx_buf_in_idx,"\x1B[%db",0);
// uart_tx_buf_in_idx += sprintf(uart_tx_buf+uart_tx_buf_in_idx,"\a");
clear_display();
@@ -413,7 +431,7 @@ void print_frequency(uint8_t item_idx){
void scan_do(uint8_t scan_state){
static uint8_t scan_timer;
frequency += items[0].step * scan_state;
canale.frequenza += items[0].step * scan_state;
set_frequency();
set_changed(0);
}

View File

@@ -19,6 +19,7 @@
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "usb_device.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
@@ -51,11 +52,11 @@
ADC_HandleTypeDef hadc1;
ADC_HandleTypeDef hadc2;
DMA_HandleTypeDef hdma_adc1;
DMA_HandleTypeDef hdma_adc2;
CORDIC_HandleTypeDef hcordic;
DAC_HandleTypeDef hdac1;
DAC_HandleTypeDef hdac3;
DMA_HandleTypeDef hdma_dac1_ch1;
DMA_HandleTypeDef hdma_dac1_ch2;
@@ -71,19 +72,11 @@ TIM_HandleTypeDef htim8;
UART_HandleTypeDef huart1;
DMA_HandleTypeDef hdma_usart1_tx;
PCD_HandleTypeDef hpcd_USB_FS;
/* USER CODE BEGIN PV */
volatile uint8_t tick;
uint32_t tick_timer;
// RX
volatile uint8_t rx_adc_buffer_ready, half_rx_dac_buffer_empty;
// TX
// volatile uint8_t half_tx_dac_buffer_empty, tx_dac_buffer_toggle;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
@@ -99,9 +92,7 @@ static void MX_USART1_UART_Init(void);
static void MX_TIM8_Init(void);
static void MX_OPAMP1_Init(void);
static void MX_ADC2_Init(void);
static void MX_DAC3_Init(void);
static void MX_OPAMP2_Init(void);
static void MX_USB_PCD_Init(void);
static void MX_I2C1_Init(void);
/* USER CODE BEGIN PFP */
@@ -125,12 +116,16 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){
}
}
// ADC
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc){
// RX ADC
if(hadc->Instance == ADC1){
rx_adc_buffer_ready = 1;
}
// TX ADC
if(hadc->Instance == ADC2){
tx_adc_buffer_pronto = 1;
}
}
void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc){
@@ -142,40 +137,30 @@ void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc){
// DAC
// rx
void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* hdac) {
lf_buffer_toggle = 0;
half_rx_dac_buffer_empty = 1;
rx_dac_buffer_toggle = 0;
rx_dac_buffer_mezzo_vuoto = 1;
}
void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac) {
lf_buffer_toggle = 1;
half_rx_dac_buffer_empty = 1;
rx_dac_buffer_toggle = 1;
rx_dac_buffer_mezzo_vuoto = 1;
}
// tx
void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef* hdac) {
// HAL_GPIO_TogglePin(GPIO1_GPIO_Port, GPIO1_Pin);
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, GPIO_PIN_RESET);
tx_dac_buffer_toggle = 0;
half_tx_dac_buffer_empty = 1;
tx_dac_buffer_mezzo_vuoto = 1;
}
void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef* hdac) {
// HAL_GPIO_TogglePin(GPIO1_GPIO_Port, GPIO1_Pin);
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, GPIO_PIN_SET);
tx_dac_buffer_toggle = 1;
half_tx_dac_buffer_empty = 1;
tx_dac_buffer_mezzo_vuoto = 1;
}
/*
void HAL_DAC_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef* hdac) {
tx_dac_buffer_toggle = 0;
half_tx_dac_buffer_empty = 1;
}
void HAL_DAC_ConvCpltCallbackCh2(DAC_HandleTypeDef* hdac) {
tx_dac_buffer_toggle = 1;
half_tx_dac_buffer_empty = 1;
}
*/
// TIMERZ
// 10 ms
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){
@@ -223,38 +208,43 @@ int display_write(char *ptr, int len){
return len;
}
void start_transmit(void){
transmit = 1;
// ADC
// HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adc_buffer, ADC_BUFFER_SIZE);
void avvia_trasmissione(void){
trasmissione = 1;
if(TX_TYPE == TX_TYPE_DAC){
// DAC
HAL_TIM_Base_Start(&htim8);
HAL_DAC_Start(&hdac1,DAC_CHANNEL_2);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_2, tx_dac_buffer, (TX_DAC_BUFFER_SIZE * 2), DAC_ALIGN_12B_R);
// adc
HAL_ADC_Start_DMA(&hadc2, (uint32_t*)tx_adc_buffer, TX_ADC_DIMENSIONE_BUFFER);
} else if(TX_TYPE == TX_TYPE_SI5351){
si5351_on();
si5351_on_clk(0);
si5351_on_clk(1);
}
if(canale.modulazione == MOD_CWL || canale.modulazione == MOD_CWU){
// TONO su DAC
HAL_TIM_Base_Start(&htim6);
HAL_DAC_Start(&hdac1,DAC_CHANNEL_1);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, lf_buffer, (LF_BUFFER_SIZE * 2), DAC_ALIGN_12B_R);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, rx_dac_buffer, (RX_DAC_BUFFER_SIZE * 2), DAC_ALIGN_12B_R);
}
}
void stop_transmit(void){
transmit = 0;
void ferma_trasmissione(void){
trasmissione = 0;
// ADC
// HAL_ADC_Stop_DMA(&hadc1);
if(TX_TYPE == TX_TYPE_DAC){
// DAC
HAL_TIM_Base_Stop(&htim8);
HAL_DAC_Stop(&hdac1,DAC_CHANNEL_2);
HAL_DAC_Stop_DMA(&hdac1, DAC_CHANNEL_2);
// ADC
HAL_ADC_Stop_DMA(&hadc2);
} else if(TX_TYPE == TX_TYPE_SI5351){
si5351_off();
si5351_off_clk(0);
si5351_off_clk(1);
}
if(canale.modulazione == MOD_CWL || canale.modulazione == MOD_CWU){
// DAC
@@ -264,19 +254,19 @@ void stop_transmit(void){
}
}
void start_receive(void){
receive = 1;
void avvia_ricezione(void){
ricezione = 1;
// ADC
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adc_buffer, RX_ADC_BUFFER_SIZE);
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)rx_adc_buffer, RX_ADC_BUFFER_SIZE);
// DAC
HAL_TIM_Base_Start(&htim6);
HAL_DAC_Start(&hdac1,DAC_CHANNEL_1);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, lf_buffer, (LF_BUFFER_SIZE * 2), DAC_ALIGN_12B_R);
HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, rx_dac_buffer, (RX_DAC_BUFFER_SIZE * 2), DAC_ALIGN_12B_R);
}
void stop_receive(void){
receive = 0;
void ferma_ricezione(void){
ricezione = 0;
// ADC
HAL_ADC_Stop_DMA(&hadc1);
@@ -356,10 +346,9 @@ int main(void)
MX_TIM8_Init();
MX_OPAMP1_Init();
MX_ADC2_Init();
MX_DAC3_Init();
MX_OPAMP2_Init();
MX_USB_PCD_Init();
MX_I2C1_Init();
MX_USB_Device_Init();
/* USER CODE BEGIN 2 */
HAL_Delay(10);
@@ -373,20 +362,33 @@ int main(void)
// display_update_state();
st2_filter_init();
audio_filter_init();
rx_inizializza_filtro_audio();
if(TX_TYPE == TX_TYPE_DAC){
// tx_audio_filter_init();
tx_filtro_audio_inizializza();
}
// diag();
// HAL_DAC_SetValue(&hdac3, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 1000);
// HAL_DAC_Start(&hdac3, DAC_CHANNEL_1);
HAL_OPAMP_Start(&hopamp1);
HAL_OPAMP_Start(&hopamp2);
set_rx_gain();
HAL_TIM_Base_Start_IT(&htim7);
HAL_UART_Receive_IT(&huart1, uart_rx_buf, 1);
// HAL_UART_Receive_IT(&huart2, uart_rx_buf, 1);
if(TX_TYPE == TX_TYPE_SI5351){
// rooto!
si53531_initialize();
if(TX_TYPE == TX_TYPE_SI5351 || LO_TYPE == LO_TYPE_SI5351){
si5351_initialize();
}
if(LO_TYPE == LO_TYPE_SI5351){
si5351_on_clk(2);
si5351_set_frequency(LO_FREQ,1);
}
start_receive();
avvia_ricezione();
/* USER CODE END 2 */
/* Infinite loop */
@@ -395,45 +397,9 @@ int main(void)
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
// HAL_GPIO_TogglePin(GPIO1_GPIO_Port, GPIO1_Pin);
// receive = transmit = 0;
if(receive){
if(rx_adc_buffer_ready){
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, SET);
rx_mixer(adc_buffer, RX_ADC_BUFFER_SIZE, if_I, if_Q, rx_nco1_increment);
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, RESET);
rx_adc_buffer_ready = 0;
}
if(half_rx_dac_buffer_empty){
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, SET);
if (canale.modulazione == MOD_DC) dc_demodulator(if_I, LF_BUFFER_SIZE, prefilter_lf_buffer);
else if(canale.modulazione == MOD_LSB || canale.modulazione == MOD_USB || canale.modulazione == MOD_CWL || canale.modulazione == MOD_CWU) ssb_demodulator(if_I, if_Q, LF_BUFFER_SIZE, prefilter_lf_buffer, NCO2_INCREMENT);
else if (canale.modulazione == MOD_AM) am_demodulator(if_I, if_Q, LF_BUFFER_SIZE, prefilter_lf_buffer);
arm_fir_q31(&audio_filter_struct, prefilter_lf_buffer, lf_buffer[lf_buffer_toggle], RX_AUDIO_FILTER_BLOCK_SIZE);
// arm_fir_q31(&audio_filter_struct, prefilter_lf_buffer, lf_buffer_test[lf_buffer_toggle], AUDIO_FILTER_BLOCK_SIZE);
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, RESET);
half_rx_dac_buffer_empty = 0;
}
}
if (transmit){
if(half_tx_dac_buffer_empty){
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, SET);
tx_mixer(tx_dac_buffer[tx_dac_buffer_toggle], TX_DAC_BUFFER_SIZE, if_I, if_Q, tx_nco1_increment);
half_tx_dac_buffer_empty = 0;
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, RESET);
}
if(tx_adc_buffer_ready){
if (canale.modulazione == MOD_DC) dc_modulator(if_I, LF_BUFFER_SIZE, prefilter_lf_buffer);
else if(canale.modulazione == MOD_LSB || canale.modulazione == MOD_USB) ssb_modulator(if_I, if_Q, LF_BUFFER_SIZE, prefilter_lf_buffer, NCO2_INCREMENT);
else if (canale.modulazione == MOD_AM) am_modulator(if_I, if_Q, LF_BUFFER_SIZE, prefilter_lf_buffer);
}
if(ricezione) ricevi();
if (trasmissione) trasmetti();
if(half_rx_dac_buffer_empty && (canale.modulazione == MOD_CWL || canale.modulazione == MOD_CWU)){
generate_tone(lf_buffer[lf_buffer_toggle], LF_BUFFER_SIZE);
half_rx_dac_buffer_empty = 0;
}
}
// 100hz
if(tick){
// consuma coda comandi
@@ -449,7 +415,7 @@ int main(void)
// eventi lenti
if(tick_timer % 8 == 0){
if(receive){
if(ricezione){
if(peak){
if(peakset == 0) click();
peakset = 50;
@@ -460,21 +426,28 @@ int main(void)
if(peakset == 0) click();
}
rx_signal = measure_log_abs_mean(if_I, LF_BUFFER_SIZE) * RX_SMETER_SCALE;
rx_signal = measure_log_abs_mean(if_I, RX_DAC_BUFFER_SIZE) * RX_SMETER_SCALE;
if(rx_signal != s_meter){
s_meter = rx_signal;
set_changed(7);
set_changed(9);
}
}
if(transmit){
tx_signal = 78;
if(trasmissione && 0){
if(TX_TYPE == TX_TYPE_SI5351) tx_signal = 78;
else if(TX_TYPE == TX_TYPE_DAC){
tx_signal = measure_log_abs_mean_tx(tx_adc_buffer, TX_ADC_DIMENSIONE_BUFFER) * TX_SMETER_SCALE;
// tx_signal++;
}
if(tx_signal != s_meter){
s_meter = tx_signal;
set_changed(7);
set_changed(9);
}
}
// lentissimi
if(tick_timer % 1024 == 0){
// click();
// salva_canale(EEPROM_NUMERO_CANALE_DEFAULT);
if(scrittura_stato_pendente){
salva_stato();
}
@@ -530,7 +503,6 @@ void SystemClock_Config(void)
{
Error_Handler();
}
HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1);
}
/**
@@ -643,12 +615,12 @@ static void MX_ADC2_Init(void)
hadc2.Init.ScanConvMode = ADC_SCAN_DISABLE;
hadc2.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
hadc2.Init.LowPowerAutoWait = DISABLE;
hadc2.Init.ContinuousConvMode = DISABLE;
hadc2.Init.ContinuousConvMode = ENABLE;
hadc2.Init.NbrOfConversion = 1;
hadc2.Init.DiscontinuousConvMode = DISABLE;
hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START;
hadc2.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
hadc2.Init.DMAContinuousRequests = DISABLE;
hadc2.Init.DMAContinuousRequests = ENABLE;
hadc2.Init.Overrun = ADC_OVR_DATA_PRESERVED;
hadc2.Init.OversamplingMode = DISABLE;
if (HAL_ADC_Init(&hadc2) != HAL_OK)
@@ -659,7 +631,7 @@ static void MX_ADC2_Init(void)
*/
sConfig.Channel = ADC_CHANNEL_VOPAMP2;
sConfig.Rank = ADC_REGULAR_RANK_1;
sConfig.SamplingTime = ADC_SAMPLETIME_2CYCLES_5;
sConfig.SamplingTime = ADC_SAMPLETIME_47CYCLES_5;
sConfig.SingleDiff = ADC_SINGLE_ENDED;
sConfig.OffsetNumber = ADC_OFFSET_NONE;
sConfig.Offset = 0;
@@ -747,8 +719,7 @@ static void MX_DAC1_Init(void)
}
/** DAC channel OUT2 config
*/
sConfig.DAC_SignedFormat = DISABLE;
sConfig.DAC_Trigger = DAC_TRIGGER_NONE;
sConfig.DAC_Trigger = DAC_TRIGGER_T8_TRGO;
if (HAL_DAC_ConfigChannel(&hdac1, &sConfig, DAC_CHANNEL_2) != HAL_OK)
{
Error_Handler();
@@ -759,51 +730,6 @@ static void MX_DAC1_Init(void)
}
/**
* @brief DAC3 Initialization Function
* @param None
* @retval None
*/
static void MX_DAC3_Init(void)
{
/* USER CODE BEGIN DAC3_Init 0 */
/* USER CODE END DAC3_Init 0 */
DAC_ChannelConfTypeDef sConfig = {0};
/* USER CODE BEGIN DAC3_Init 1 */
/* USER CODE END DAC3_Init 1 */
/** DAC Initialization
*/
hdac3.Instance = DAC3;
if (HAL_DAC_Init(&hdac3) != HAL_OK)
{
Error_Handler();
}
/** DAC channel OUT1 config
*/
sConfig.DAC_HighFrequency = DAC_HIGH_FREQUENCY_INTERFACE_MODE_AUTOMATIC;
sConfig.DAC_DMADoubleDataMode = DISABLE;
sConfig.DAC_SignedFormat = DISABLE;
sConfig.DAC_SampleAndHold = DAC_SAMPLEANDHOLD_DISABLE;
sConfig.DAC_Trigger = DAC_TRIGGER_NONE;
sConfig.DAC_Trigger2 = DAC_TRIGGER_NONE;
sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_DISABLE;
sConfig.DAC_ConnectOnChipPeripheral = DAC_CHIPCONNECT_INTERNAL;
sConfig.DAC_UserTrimming = DAC_TRIMMING_FACTORY;
if (HAL_DAC_ConfigChannel(&hdac3, &sConfig, DAC_CHANNEL_1) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN DAC3_Init 2 */
/* USER CODE END DAC3_Init 2 */
}
/**
* @brief I2C1 Initialization Function
* @param None
@@ -1087,39 +1013,6 @@ static void MX_USART1_UART_Init(void)
}
/**
* @brief USB Initialization Function
* @param None
* @retval None
*/
static void MX_USB_PCD_Init(void)
{
/* USER CODE BEGIN USB_Init 0 */
/* USER CODE END USB_Init 0 */
/* USER CODE BEGIN USB_Init 1 */
/* USER CODE END USB_Init 1 */
hpcd_USB_FS.Instance = USB;
hpcd_USB_FS.Init.dev_endpoints = 8;
hpcd_USB_FS.Init.speed = PCD_SPEED_FULL;
hpcd_USB_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
hpcd_USB_FS.Init.Sof_enable = DISABLE;
hpcd_USB_FS.Init.low_power_enable = DISABLE;
hpcd_USB_FS.Init.lpm_enable = DISABLE;
hpcd_USB_FS.Init.battery_charging_enable = DISABLE;
if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USB_Init 2 */
/* USER CODE END USB_Init 2 */
}
/**
* Enable DMA controller clock
*/
@@ -1137,6 +1030,9 @@ static void MX_DMA_Init(void)
/* DMA1_Channel2_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel2_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel2_IRQn);
/* DMA1_Channel3_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel3_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel3_IRQn);
/* DMA1_Channel4_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel4_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel4_IRQn);
@@ -1161,10 +1057,7 @@ static void MX_GPIO_Init(void)
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIO5_GPIO_Port, GPIO5_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOB, GPIO4_Pin|GPIO3_Pin|GPIO2_Pin|GPIO1_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, GPIO_PIN_RESET);
/*Configure GPIO pins : NC1_Pin NC2_Pin */
GPIO_InitStruct.Pin = NC1_Pin|NC2_Pin;
@@ -1172,27 +1065,12 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pin : GPIO5_Pin */
GPIO_InitStruct.Pin = GPIO5_Pin;
/*Configure GPIO pin : GPIO1_Pin */
GPIO_InitStruct.Pin = GPIO1_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIO5_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : GPIO4_Pin GPIO3_Pin GPIO2_Pin GPIO1_Pin */
GPIO_InitStruct.Pin = GPIO4_Pin|GPIO3_Pin|GPIO2_Pin|GPIO1_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : PA8 */
GPIO_InitStruct.Pin = GPIO_PIN_8;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF0_MCO;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
HAL_GPIO_Init(GPIO1_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : PTT_Pin */
GPIO_InitStruct.Pin = PTT_Pin;

View File

@@ -8,6 +8,15 @@
q31_t rx_nco1_increment;
// RX ADC
volatile uint8_t rx_adc_buffer_ready;
uint16_t rx_adc_buffer[RX_ADC_BUFFER_SIZE];
// RX DAC
volatile uint8_t rx_dac_buffer_toggle, rx_dac_buffer_mezzo_vuoto;
q31_t prefilter_rx_dac_buffer[RX_DAC_BUFFER_SIZE];
q31_t rx_dac_buffer[2][RX_DAC_BUFFER_SIZE];
uint8_t rx_signal, rx_signal_last;
// filtro 2
@@ -102,6 +111,20 @@ int32_t st2_wide_taps[ST2_FILTER_TAP_NUM] = {
int32_t audio_filter_coeffs[RX_AUDIO_FILTER_TAP_NUM];
void ricevi(void){
if(rx_adc_buffer_ready){
rx_mixer(rx_adc_buffer, RX_ADC_BUFFER_SIZE, if_I, if_Q, rx_nco1_increment);
rx_adc_buffer_ready = 0;
}
if(rx_dac_buffer_mezzo_vuoto){
if (canale.modulazione == MOD_DC) dc_demodulator(if_I, RX_DAC_BUFFER_SIZE, prefilter_rx_dac_buffer);
else if(canale.modulazione == MOD_LSB || canale.modulazione == MOD_USB || canale.modulazione == MOD_CWL || canale.modulazione == MOD_CWU) ssb_demodulator(if_I, if_Q, RX_DAC_BUFFER_SIZE, prefilter_rx_dac_buffer, NCO2_INCREMENT);
else if (canale.modulazione == MOD_AM) am_demodulator(if_I, if_Q, RX_DAC_BUFFER_SIZE, prefilter_rx_dac_buffer);
arm_fir_q31(&audio_filter_struct, prefilter_rx_dac_buffer, rx_dac_buffer[rx_dac_buffer_toggle], RX_AUDIO_FILTER_BLOCK_SIZE);
rx_dac_buffer_mezzo_vuoto = 0;
}
}
// mix
void rx_mixer(uint16_t *in, uint16_t size, q31_t *I_out, q31_t *Q_out, int32_t nco_freq){
@@ -191,36 +214,17 @@ void ssb_demodulator(q31_t *in_I, q31_t *in_Q, uint16_t size, q31_t *out, q31_t
void dc_demodulator(q31_t *in, uint16_t size, q31_t *out){
uint16_t i;
i = 0;
while(i < LF_BUFFER_SIZE){
while(i < RX_DAC_BUFFER_SIZE){
out[i] = ((in[i]*(int32_t)stato.volume))/4096;
i++;
}
}
/*
void nco(uint16_t size, q31_t *out, q31_t nco_freq){
uint16_t i;
int32_t sin, cos, tmp;
static int32_t phase_accu;
LL_CORDIC_WriteData(CORDIC, phase_accu);
i = 0;
while(i < size){
tmp = LL_CORDIC_ReadData(CORDIC);
phase_accu += nco_freq;
LL_CORDIC_WriteData(CORDIC, phase_accu);
sin = (int16_t)tmp;
cos = tmp>>16;
out[i] = cos/stato.volume;
i++;
}
tmp = LL_CORDIC_ReadData(CORDIC);
}
*/
// filtri
// filtro halfband fir generato da tools/fir_generate.c
inline q31_t hb_fir15(q31_t * samples_ringbuf, uint8_t sample_index, uint8_t buff_size_mask, q31_t * coefficients){
q63_t sum0 = 0;
sum0 += (q63_t) samples_ringbuf[(sample_index - 0) & buff_size_mask] * coefficients[0];
@@ -245,7 +249,7 @@ void st2_filter_init(void){
}
}
void audio_filter_init(void){
void rx_inizializza_filtro_audio(void){
arm_fir_init_q31 (&audio_filter_struct, RX_AUDIO_FILTER_TAP_NUM, audio_filter_coeffs, &audio_filter_state[0], RX_AUDIO_FILTER_BLOCK_SIZE);
}
@@ -266,3 +270,11 @@ void audio_filter_generate_coeffs(int32_t *Coeffs, uint32_t freq, uint32_t bw, u
void set_rx_audio_filter(void){
audio_filter_generate_coeffs(audio_filter_coeffs, audio_filter_freq, audio_filter_bw, audio_filter_beta);
}
void set_rx_nco1_freq(int32_t freq){
int64_t tmp_increment;
if(canale.modulazione == MOD_USB || canale.modulazione == MOD_CWU) freq += (RX_NCO_FREQUENCY);
else if(canale.modulazione == MOD_LSB || canale.modulazione == MOD_CWL) freq -= (RX_NCO_FREQUENCY);
tmp_increment = ((int64_t)freq * 0x100000000LL)/RX_ADC_SAMPLE_RATE;
rx_nco1_increment = (int32_t)tmp_increment;
}

View File

@@ -5,6 +5,8 @@
#include <math.h>
#include "si5351.h"
uint8_t oeb;
void si5351_write8 (uint8_t reg, uint8_t value){
while (HAL_I2C_IsDeviceReady(&hi2c1, (uint16_t)(SI5351_ADDRESS<<1), 3, 100) != HAL_OK) { }
HAL_I2C_Mem_Write(&hi2c1, (uint8_t)(SI5351_ADDRESS<<1), (uint8_t)reg, I2C_MEMADD_SIZE_8BIT, (uint8_t*)(&value), 1, 100);
@@ -61,14 +63,14 @@ void CalcRegisters(uint32_t fout, uint8_t *regs){
d = 6;
else if (d % 2) // Make d even to reduce phase noise/jitter, see datasheet 4.1.2.1.
d++;
if (d * fout < 600e6) // VCO frequency to low check and maintain an even d value
d += 2;
}
msx_p1 = 128 * d - 512;
uint32_t fvco = (uint32_t) d * r * fout;
// Calc Feedback Multisynth Divider
double fmd = (double)fvco / SI5351_CRYSTAL_FREQ; // The FMD value has been found
int a = fmd; // a is the integer part of the FMD value
@@ -111,18 +113,18 @@ void CalcRegisters(uint32_t fout, uint8_t *regs){
return;
}
void si53531_initialize(){
void si5351_initialize(){
uint8_t dummy;
// Initialize Si5351A
while (si5351_read8(0,dummy) & 0x80); // Wait for Si5351A to initialize
si5351_write8(SI5351_OUT_ENABLE, 0xFF); // Output Enable Control, disable all
// Initialize Si5351A
while (si5351_read8(0,dummy) & 0x80); // Wait for Si5351A to initialize
oeb = 0xFF;
si5351_write8(SI5351_OUT_ENABLE, oeb); // Output Enable Control, disable all
// for (int i = 16; i < 24; i++) si5351_write8 (i, 0x80); // CLKi Control, power down CLKi
si5351_write8(SI5351_INPUT_SOURCE, 0x00); // PLL Input Source, select the XTAL input as the reference clock for PLLA and PLLB
si5351_write8(SI5351_OUT_DIS_STATE, 0x00);
si5351_write8(SI5351_OUT_DIS_STATE, 0x00); // stato bassa Z giu se disabilitati
// Output Multisynth0, e = 0, f = 1, MS0_P2 and MSO_P3
// Output MultisynthN, e = 0, f = 1, MS0_P2 and MSO_P3
si5351_write8(SI5351_MULTISYNTH0, 0x00);
si5351_write8(SI5351_MULTISYNTH0+1, 0x01);
si5351_write8(SI5351_MULTISYNTH0+5, 0x00);
@@ -134,45 +136,51 @@ void si53531_initialize(){
si5351_write8(SI5351_MULTISYNTH1+5, 0x00);
si5351_write8(SI5351_MULTISYNTH1+6, 0x00);
si5351_write8(SI5351_MULTISYNTH1+7, 0x00);
si5351_write8(SI5351_MULTISYNTH2, 0x00);
si5351_write8(SI5351_MULTISYNTH2+1, 0x01);
si5351_write8(SI5351_MULTISYNTH2+5, 0x00);
si5351_write8(SI5351_MULTISYNTH2+6, 0x00);
si5351_write8(SI5351_MULTISYNTH2+7, 0x00);
si5351_write8(SI5351_CLK0_CONTROL, 0x4F); // Power up CLK0, PLLA, MS0 operates in integer mode, Output Clock 0 is not inverted, Select MultiSynth 0 as the source for CLK0 and 8 mA
si5351_write8(SI5351_CLK1_CONTROL, 0x5F); // Power up CLK1, PLLA, MS0 operates in integer mode, Output Clock 0 is inverted, Select MultiSynth 0 as the source for CLK0 and 8 mA
si5351_write8(SI5351_CLK2_CONTROL, 0x6f); // Power up CLK2, PLLB, int, non inv
si5351_write8(SI5351_CLK1_CONTROL, 0x5F); // Power up CLK1, PLLA, MS0 operates in integer mode, Output Clock 1 is inverted, Select MultiSynth 1 as the source for CLK1 and 8 mA
si5351_write8(SI5351_CLK2_CONTROL, 0x6F); // Power up CLK2, PLLB, int, non inv, multisynth 2, 8 ma
// Reference load configuration
si5351_write8(SI5351_CRYSTAL_LOAD, 0x12); // Set reference load C: 6 pF = 0x12, 8 pF = 0x92, 10 pF = 0xD2
}
void si53531_set_frequency(uint32_t freq, uint8_t synth){
uint8_t regs[16];
void si5351_set_frequency(uint32_t freq, uint8_t pll){
uint8_t regs[16];
CalcRegisters(freq, regs);
// Load Output Multisynth0 with d (e and f already set during init. and never changed)
if(synth == 0){
// Load PLLA Feedback Multisynth NA
if(pll == 0){
for (int i = 0; i < 8; i++)
si5351_write8(SI5351_PLLA + i, regs[i]);
for (int i = 10; i < 13; i++)
si5351_write8(34 + i, regs[i]);
} else if(synth == 1){
} else if(pll == 1){
for (int i = 0; i < 8; i++)
si5351_write8(SI5351_PLLB + i, regs[i]);
for (int i = 10; i < 13; i++)
si5351_write8(42 + i, regs[i]);
}
// Reset PLLA
// delayMicroseconds(500); // Allow registers to settle before resetting the PLL
si5351_write8(SI5351_RESET, 0x20);
}
void si5351_off(void){
si5351_write8(SI5351_OUT_ENABLE, 0xFF);
void si5351_off_clk(uint8_t clk){
oeb |= 1U << clk;
si5351_write8(SI5351_OUT_ENABLE, oeb);
}
void si5351_on(void){
// FC solo clk0 clk1
si5351_write8(SI5351_OUT_ENABLE, 0xF8);
void si5351_on_clk(uint8_t clk){
oeb &= ~(1U << clk);
si5351_write8(SI5351_OUT_ENABLE, oeb);
}
#endif

View File

@@ -26,6 +26,8 @@
/* USER CODE END Includes */
extern DMA_HandleTypeDef hdma_adc1;
extern DMA_HandleTypeDef hdma_adc2;
extern DMA_HandleTypeDef hdma_dac1_ch1;
extern DMA_HandleTypeDef hdma_dac1_ch2;
@@ -164,6 +166,25 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
if(HAL_RCC_ADC12_CLK_ENABLED==1){
__HAL_RCC_ADC12_CLK_ENABLE();
}
/* ADC2 DMA Init */
/* ADC2 Init */
hdma_adc2.Instance = DMA1_Channel3;
hdma_adc2.Init.Request = DMA_REQUEST_ADC2;
hdma_adc2.Init.Direction = DMA_PERIPH_TO_MEMORY;
hdma_adc2.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_adc2.Init.MemInc = DMA_MINC_ENABLE;
hdma_adc2.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
hdma_adc2.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
hdma_adc2.Init.Mode = DMA_CIRCULAR;
hdma_adc2.Init.Priority = DMA_PRIORITY_LOW;
if (HAL_DMA_Init(&hdma_adc2) != HAL_OK)
{
Error_Handler();
}
__HAL_LINKDMA(hadc,DMA_Handle,hdma_adc2);
/* ADC2 interrupt Init */
HAL_NVIC_SetPriority(ADC1_2_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(ADC1_2_IRQn);
@@ -220,6 +241,9 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
__HAL_RCC_ADC12_CLK_DISABLE();
}
/* ADC2 DMA DeInit */
HAL_DMA_DeInit(hadc->DMA_Handle);
/* ADC2 interrupt DeInit */
/* USER CODE BEGIN ADC2:ADC1_2_IRQn disable */
/**
@@ -346,17 +370,6 @@ void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac)
/* USER CODE END DAC1_MspInit 1 */
}
else if(hdac->Instance==DAC3)
{
/* USER CODE BEGIN DAC3_MspInit 0 */
/* USER CODE END DAC3_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_DAC3_CLK_ENABLE();
/* USER CODE BEGIN DAC3_MspInit 1 */
/* USER CODE END DAC3_MspInit 1 */
}
}
@@ -389,17 +402,6 @@ void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac)
/* USER CODE END DAC1_MspDeInit 1 */
}
else if(hdac->Instance==DAC3)
{
/* USER CODE BEGIN DAC3_MspDeInit 0 */
/* USER CODE END DAC3_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_DAC3_CLK_DISABLE();
/* USER CODE BEGIN DAC3_MspDeInit 1 */
/* USER CODE END DAC3_MspDeInit 1 */
}
}
@@ -775,60 +777,6 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
}
/**
* @brief PCD MSP Initialization
* This function configures the hardware resources used in this example
* @param hpcd: PCD handle pointer
* @retval None
*/
void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
{
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
if(hpcd->Instance==USB)
{
/* USER CODE BEGIN USB_MspInit 0 */
/* USER CODE END USB_MspInit 0 */
/** Initializes the peripherals clocks
*/
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
{
Error_Handler();
}
/* Peripheral clock enable */
__HAL_RCC_USB_CLK_ENABLE();
/* USER CODE BEGIN USB_MspInit 1 */
/* USER CODE END USB_MspInit 1 */
}
}
/**
* @brief PCD MSP De-Initialization
* This function freeze the hardware resources used in this example
* @param hpcd: PCD handle pointer
* @retval None
*/
void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd)
{
if(hpcd->Instance==USB)
{
/* USER CODE BEGIN USB_MspDeInit 0 */
/* USER CODE END USB_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USB_CLK_DISABLE();
/* USER CODE BEGIN USB_MspDeInit 1 */
/* USER CODE END USB_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */

View File

@@ -56,7 +56,9 @@
/* USER CODE END 0 */
/* External variables --------------------------------------------------------*/
extern PCD_HandleTypeDef hpcd_USB_FS;
extern DMA_HandleTypeDef hdma_adc1;
extern DMA_HandleTypeDef hdma_adc2;
extern ADC_HandleTypeDef hadc1;
extern ADC_HandleTypeDef hadc2;
extern DMA_HandleTypeDef hdma_dac1_ch1;
@@ -234,6 +236,20 @@ void DMA1_Channel2_IRQHandler(void)
/* USER CODE END DMA1_Channel2_IRQn 1 */
}
/**
* @brief This function handles DMA1 channel3 global interrupt.
*/
void DMA1_Channel3_IRQHandler(void)
{
/* USER CODE BEGIN DMA1_Channel3_IRQn 0 */
/* USER CODE END DMA1_Channel3_IRQn 0 */
HAL_DMA_IRQHandler(&hdma_adc2);
/* USER CODE BEGIN DMA1_Channel3_IRQn 1 */
/* USER CODE END DMA1_Channel3_IRQn 1 */
}
/**
* @brief This function handles DMA1 channel4 global interrupt.
*/
@@ -277,6 +293,20 @@ void ADC1_2_IRQHandler(void)
/* USER CODE END ADC1_2_IRQn 1 */
}
/**
* @brief This function handles USB low priority interrupt remap.
*/
void USB_LP_IRQHandler(void)
{
/* USER CODE BEGIN USB_LP_IRQn 0 */
/* USER CODE END USB_LP_IRQn 0 */
HAL_PCD_IRQHandler(&hpcd_USB_FS);
/* USER CODE BEGIN USB_LP_IRQn 1 */
/* USER CODE END USB_LP_IRQn 1 */
}
/**
* @brief This function handles USART1 global interrupt / USART1 wake-up interrupt through EXTI line 25.
*/

View File

@@ -8,50 +8,139 @@
q31_t tx_nco1_increment;
uint8_t tx_signal, tx_signal_last;
volatile uint8_t half_tx_dac_buffer_empty, tx_dac_buffer_toggle;
volatile uint8_t tx_adc_buffer_ready;
// TX ADC
volatile uint8_t tx_adc_buffer_pronto;
uint16_t tx_adc_buffer[TX_ADC_DIMENSIONE_BUFFER];
// TX filtro audio
arm_fir_instance_q31 tx_filtro_audio_struttura;
q31_t tx_filtro_audio_stato[TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO + TX_FILTRO_AUDIO_NUMERO_TAP - 1];
int32_t tx_filtro_audio_coefficienti[TX_FILTRO_AUDIO_NUMERO_TAP];
// TX IF
q31_t tx_audio_buffer_fitrato[TX_ADC_DIMENSIONE_BUFFER], tx_I_buffer[TX_ADC_DIMENSIONE_BUFFER], tx_Q_buffer[TX_ADC_DIMENSIONE_BUFFER];
// TX DAC
volatile uint8_t tx_dac_buffer_mezzo_vuoto, tx_dac_buffer_toggle;
q31_t tx_dac_buffer[2][TX_DAC_BUFFER_SIZE];
// FILTRO
arm_fir_instance_q31 tx_audio_filter_I_struct, tx_audio_filter_Q_struct;
q31_t tx_audio_filter_I_state[TX_AUDIO_FILTER_BLOCK_SIZE + TX_AUDIO_FILTER_TAP_NUM - 1];
q31_t tx_audio_filter_Q_state[TX_AUDIO_FILTER_BLOCK_SIZE + TX_AUDIO_FILTER_TAP_NUM - 1];
int32_t tx_audio_filter_coeffs[TX_AUDIO_FILTER_TAP_NUM];
//arm_fir_instance_q31 tx_audio_filter_I_struct, tx_audio_filter_Q_struct;
// q31_t tx_audio_filter_I_state[TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO + TX_FILTRO_AUDIO_NUMERO_TAP - 1];
// q31_t tx_audio_filter_Q_state[TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO + TX_FILTRO_AUDIO_NUMERO_TAP - 1];
void tx_mixer(uint16_t *out, uint16_t size, q31_t *I_in, q31_t *Q_in, int32_t nco_freq){
uint16_t i = 0;
// =============
void trasmetti(void){
if(TX_TYPE == TX_TYPE_DAC){
if(tx_adc_buffer_pronto){
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, GPIO_PIN_SET);
tx_filtra_audio(tx_audio_buffer_fitrato, TX_ADC_DIMENSIONE_BUFFER, tx_adc_buffer);
if (canale.modulazione == MOD_DC) modulatore_dc(tx_I_buffer, tx_Q_buffer, TX_ADC_DIMENSIONE_BUFFER, tx_audio_buffer_fitrato);
else if(canale.modulazione == MOD_LSB || canale.modulazione == MOD_USB) modulatore_ssb(tx_I_buffer, tx_Q_buffer, TX_ADC_DIMENSIONE_BUFFER, tx_audio_buffer_fitrato, NCO2_INCREMENT);
else if (canale.modulazione == MOD_AM) modulatore_am(tx_I_buffer, tx_Q_buffer, TX_ADC_DIMENSIONE_BUFFER, tx_audio_buffer_fitrato);
else if (canale.modulazione == MOD_CWL || canale.modulazione == MOD_CWU) modulatore_cw(tx_I_buffer, TX_ADC_DIMENSIONE_BUFFER);
tx_adc_buffer_pronto = 0;
// HAL_GPIO_WritePin(GPIO1_GPIO_Port, GPIO1_Pin, GPIO_PIN_RESET);
}
if(tx_dac_buffer_mezzo_vuoto){
tx_mixer(tx_dac_buffer[tx_dac_buffer_toggle], TX_DAC_BUFFER_SIZE, tx_I_buffer, tx_Q_buffer, tx_nco1_increment);
tx_dac_buffer_mezzo_vuoto = 0;
}
}
// genera tono CW
if(rx_dac_buffer_mezzo_vuoto && (canale.modulazione == MOD_CWL || canale.modulazione == MOD_CWU)){
genera_tono(rx_dac_buffer[rx_dac_buffer_toggle], RX_DAC_BUFFER_SIZE);
rx_dac_buffer_mezzo_vuoto = 0;
}
}
// trasforma da uint12 a q31 e filtra audio in ingresso
void tx_audio_filter_init(void){
arm_fir_interpolate_init_q15 (&tx_audio_filter_I_struct, TX_FILTRO_AUDIO_FATTORE_INTERPOLAZIONE, TX_FILTRO_AUDIO_NUMERO_TAP, tx_audio_filter_coeffs, &tx_audio_filter_I_state[0], TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO);
arm_fir_interpolate_init_q15 (&tx_audio_filter_Q_struct, TX_FILTRO_AUDIO_FATTORE_INTERPOLAZIONE, TX_FILTRO_AUDIO_NUMERO_TAP, tx_audio_filter_coeffs, &tx_audio_filter_Q_state[0], TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO);
}
void tx_filtro_audio_inizializza(void){
arm_fir_init_q31 (&tx_filtro_audio_struttura, TX_FILTRO_AUDIO_NUMERO_TAP, tx_filtro_audio_coefficienti, &tx_filtro_audio_stato[0], TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO);
}
void tx_filtra_audio(q31_t *out, uint16_t dimensione, uint16_t *in){
uint16_t indice;
q31_t tmp_buffer[TX_ADC_DIMENSIONE_BUFFER];
while(indice < dimensione){
tmp_buffer[indice] = ((int32_t)in[indice] - 2048) * 2;
indice++;
}
arm_fir_q31(&tx_filtro_audio_struttura, tmp_buffer, out, TX_FILTRO_AUDIO_DIMENSIONE_BLOCCO);
}
// miscela I&Q con NCO
void tx_mixer(q31_t *out, uint16_t dimensione_out, q31_t *I_in, q31_t *Q_in, int32_t incremento_nco){
uint16_t indice_out = 0;
uint16_t indice_IQ = 0;
int32_t sin, cos, tmp;
static int32_t phase_accu;
static int32_t accumulatore_fase;
// perche?
nco_freq = nco_freq>>2;
LL_CORDIC_WriteData(CORDIC, phase_accu);
while(i < (size * 2)){
LL_CORDIC_WriteData(CORDIC, accumulatore_fase);
// sovracampiona I e Q
// arm_fir_interpolate_q31 prende troppa memoria
// arm_fir_interpolate_q31(&tx_audio_filter_I_struct, I_in, I_tmp, TX_AUDIO_FILTER_BLOCK_SIZE);
// arm_fir_interpolate_q31(&tx_audio_filter_Q_struct, Q_in, Q_tmp, TX_AUDIO_FILTER_BLOCK_SIZE);
while(indice_out < dimensione_out){
indice_IQ = indice_out/TX_FILTRO_RF_FATTORE_INTERPOLAZIONE; // indice IQ ingresso va da 0 a 64
tmp = LL_CORDIC_ReadData(CORDIC);
phase_accu += nco_freq;
LL_CORDIC_WriteData(CORDIC, phase_accu);
accumulatore_fase += incremento_nco;
LL_CORDIC_WriteData(CORDIC, accumulatore_fase);
sin = (int16_t)tmp;
cos = tmp>>16;
// out[i] = (int32_t)cos;
// out[i] = 2000;
out[i] = cos>>4;
// out[i] = (I_in[i] * sin) + (Q_in[i] * cos);
i++;
// out[indice_out] = indice_out;
// out[indice_out] = (cos>>4) + 2048;
// out[indice_out] = (sin/16);
// out[indice_out] = I_in[indice_IQ];
out[indice_out] = ((I_in[indice_IQ] * sin) + (Q_in[indice_IQ] * cos))/0x1000;
// interpolazione grezza, da rifare
// out[indice_out] = (((I_in[indice_IQ] * sin) + (Q_in[indice_IQ] * cos)) >> 20) + 2048;
indice_out++;
}
tmp = LL_CORDIC_ReadData(CORDIC);
}
// modulatori
void ssb_modulator(q31_t *out_I, q31_t *out_Q, uint16_t size, q31_t *in, q31_t nco_freq){
void modulatore_dc(q31_t *out_I, q31_t *out_Q, uint16_t dimensione, q31_t *in){
uint16_t indice = 0;
static double angle;
while(indice < dimensione){
// angle += 0.15;
// if(angle >= 6.28) angle = 0;
out_I[indice] = in[indice];
out_Q[indice] = 0;
// out[indice] = indice * 32;
// out[indice] = (int32_t)sin(indice) * 2000;
// out[indice] = 0;
indice++;
}
}
void modulatore_ssb(q31_t *out_I, q31_t *out_Q, uint16_t dimensione, q31_t *in, q31_t nco_freq){
uint16_t i;
static int32_t phase_accu;
static int32_t accumulatore_fase;
int32_t sin, cos, tmp;
LL_CORDIC_WriteData(CORDIC, phase_accu);
LL_CORDIC_WriteData(CORDIC, accumulatore_fase);
i = 0;
while(i < size){
while(i < dimensione){
tmp = LL_CORDIC_ReadData(CORDIC);
phase_accu += nco_freq;
LL_CORDIC_WriteData(CORDIC, phase_accu);
accumulatore_fase += nco_freq;
LL_CORDIC_WriteData(CORDIC, accumulatore_fase);
sin = (int16_t)tmp;
cos = tmp>>16;
out_I = sat_mult_q31(sin, in[i]);
@@ -62,31 +151,29 @@ void ssb_modulator(q31_t *out_I, q31_t *out_Q, uint16_t size, q31_t *in, q31_t n
}
void dc_modulator(q31_t *in, uint16_t size, q31_t *out){
uint16_t i;
i = 0;
while(i < LF_BUFFER_SIZE){
out[i] = ((in[i]*(int32_t)mic_gain))/4096;
i++;
}
}
void am_modulator(q31_t *out_I, q31_t *out_Q, uint16_t size, q31_t *in){
void modulatore_am(q31_t *out_I, q31_t *out_Q, uint16_t dimensione, q31_t *in){
// SQRT (I * I + Q * Q)
uint16_t i;
i = 0;
while(i < size){
while(i < dimensione){
out_I[i] = in[i];
out_Q[i] = 0;
i++;
}
}
void tx_audio_filter_init(void){
arm_fir_interpolate_init_q15 (&tx_audio_filter_I_struct, TX_AUDIO_FILTER_INTERPOLATION_FACTOR, TX_AUDIO_FILTER_TAP_NUM, tx_audio_filter_coeffs, &tx_audio_filter_I_state[0], TX_AUDIO_FILTER_BLOCK_SIZE);
arm_fir_interpolate_init_q15 (&tx_audio_filter_Q_struct, TX_AUDIO_FILTER_INTERPOLATION_FACTOR, TX_AUDIO_FILTER_TAP_NUM, tx_audio_filter_coeffs, &tx_audio_filter_Q_state[0], TX_AUDIO_FILTER_BLOCK_SIZE);
void modulatore_fm(q31_t *out_I, q31_t *out_Q, uint16_t dimensione, q31_t *in){
}
void modulatore_cw(q31_t *out, uint16_t dimensione){
uint16_t indice = 0;
while(indice < dimensione){
out[indice] = 0x80000000;
}
}
uint16_t u12_sine(void){
static double angle;
angle += CW_TONE_INCREMENT;
@@ -94,10 +181,45 @@ uint16_t u12_sine(void){
return (uint16_t)((sin(angle) * CW_TONE_VOLUME) + 0x7ff);
}
void generate_tone(q31_t *buffer, uint16_t buffer_size){
void genera_tono(q31_t *buffer, uint16_t buffer_dimensione){
uint16_t i;
while(i < buffer_size){
while(i < buffer_dimensione){
buffer[i] = u12_sine();
i++;
}
}
uint8_t measure_log_abs_mean_tx(q31_t *samples, uint16_t dimensione){
int32_t measured_signal = 0;
uint16_t index = 0;
uint8_t log_sig = 31;
q31_t abs;
while(index < dimensione){
samples[index] = (int32_t)samples[index]-2048;
abs = (samples[index] > 0) ? samples[index] : (q31_t)__QSUB(0, samples[index]);
measured_signal += (abs >> 6);
index++;
}
while (log_sig) {
if((measured_signal >> log_sig) & 1) break;
log_sig--;
}
return log_sig;
}
void set_tx_nco1_freq(int32_t freq){
if(TX_TYPE == TX_TYPE_DAC){
int64_t tmp_increment;
if(canale.modulazione == MOD_USB || canale.modulazione == MOD_CWU) freq += (TX_NCO_FREQUENCY);
else if(canale.modulazione == MOD_LSB || canale.modulazione == MOD_CWL) freq -= (TX_NCO_FREQUENCY);
tmp_increment = ((int64_t)freq * 0x100000000LL)/TX_DAC_SAMPLE_RATE;
// perche >>1 ?
tx_nco1_increment = (int32_t)tmp_increment>>1;
} else if(TX_TYPE == TX_TYPE_SI5351){
si5351_set_frequency(canale.frequenza, 0);
si5351_set_frequency(canale.frequenza, 1);
}
}

View File

@@ -1,5 +1,5 @@
##########################################################################################################################
# File automatically-generated by tool: [projectgenerator] version: [3.15.2] date: [Mon Jan 17 14:59:07 CET 2022]
# File automatically-generated by tool: [projectgenerator] version: [3.15.2] date: [Mon Feb 07 02:00:22 CET 2022]
##########################################################################################################################
# ------------------------------------------------
@@ -89,7 +89,15 @@ Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pcd.c \
Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pcd_ex.c \
Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_ll_usb.c \
Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_i2c.c \
Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_i2c_ex.c
Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_i2c_ex.c \
USB_Device/App/usb_device.c \
USB_Device/App/usbd_desc.c \
USB_Device/App/usbd_cdc_if.c \
USB_Device/Target/usbd_conf.c \
Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c \
Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c \
Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c \
Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
# ASM sources
ASM_SOURCES = \
@@ -152,7 +160,11 @@ C_INCLUDES = \
-IDrivers/CMSIS/Device/ST/STM32G4xx/Include \
-IDrivers/CMSIS/Include \
-IMiddlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/PrivateInclude \
-IMiddlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/
-IMiddlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/ \
-IUSB_Device/App \
-IUSB_Device/Target \
-IMiddlewares/ST/STM32_USB_Device_Library/Core/Inc \
-IMiddlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc
# compile gcc flags
# compile gcc flagsASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections

View File

@@ -0,0 +1,175 @@
/**
******************************************************************************
* @file usbd_cdc.h
* @author MCD Application Team
* @brief header file for the usbd_cdc.c file.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USB_CDC_H
#define __USB_CDC_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_ioreq.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup usbd_cdc
* @brief This file is the Header file for usbd_cdc.c
* @{
*/
/** @defgroup usbd_cdc_Exported_Defines
* @{
*/
#define CDC_IN_EP 0x81U /* EP1 for data IN */
#define CDC_OUT_EP 0x01U /* EP1 for data OUT */
#define CDC_CMD_EP 0x82U /* EP2 for CDC commands */
#ifndef CDC_HS_BINTERVAL
#define CDC_HS_BINTERVAL 0x10U
#endif /* CDC_HS_BINTERVAL */
#ifndef CDC_FS_BINTERVAL
#define CDC_FS_BINTERVAL 0x10U
#endif /* CDC_FS_BINTERVAL */
/* CDC Endpoints parameters: you can fine tune these values depending on the needed baudrates and performance. */
#define CDC_DATA_HS_MAX_PACKET_SIZE 512U /* Endpoint IN & OUT Packet size */
#define CDC_DATA_FS_MAX_PACKET_SIZE 64U /* Endpoint IN & OUT Packet size */
#define CDC_CMD_PACKET_SIZE 8U /* Control Endpoint Packet size */
#define USB_CDC_CONFIG_DESC_SIZ 67U
#define CDC_DATA_HS_IN_PACKET_SIZE CDC_DATA_HS_MAX_PACKET_SIZE
#define CDC_DATA_HS_OUT_PACKET_SIZE CDC_DATA_HS_MAX_PACKET_SIZE
#define CDC_DATA_FS_IN_PACKET_SIZE CDC_DATA_FS_MAX_PACKET_SIZE
#define CDC_DATA_FS_OUT_PACKET_SIZE CDC_DATA_FS_MAX_PACKET_SIZE
#define CDC_REQ_MAX_DATA_SIZE 0x7U
/*---------------------------------------------------------------------*/
/* CDC definitions */
/*---------------------------------------------------------------------*/
#define CDC_SEND_ENCAPSULATED_COMMAND 0x00U
#define CDC_GET_ENCAPSULATED_RESPONSE 0x01U
#define CDC_SET_COMM_FEATURE 0x02U
#define CDC_GET_COMM_FEATURE 0x03U
#define CDC_CLEAR_COMM_FEATURE 0x04U
#define CDC_SET_LINE_CODING 0x20U
#define CDC_GET_LINE_CODING 0x21U
#define CDC_SET_CONTROL_LINE_STATE 0x22U
#define CDC_SEND_BREAK 0x23U
/**
* @}
*/
/** @defgroup USBD_CORE_Exported_TypesDefinitions
* @{
*/
/**
* @}
*/
typedef struct
{
uint32_t bitrate;
uint8_t format;
uint8_t paritytype;
uint8_t datatype;
} USBD_CDC_LineCodingTypeDef;
typedef struct _USBD_CDC_Itf
{
int8_t (* Init)(void);
int8_t (* DeInit)(void);
int8_t (* Control)(uint8_t cmd, uint8_t *pbuf, uint16_t length);
int8_t (* Receive)(uint8_t *Buf, uint32_t *Len);
int8_t (* TransmitCplt)(uint8_t *Buf, uint32_t *Len, uint8_t epnum);
} USBD_CDC_ItfTypeDef;
typedef struct
{
uint32_t data[CDC_DATA_HS_MAX_PACKET_SIZE / 4U]; /* Force 32bits alignment */
uint8_t CmdOpCode;
uint8_t CmdLength;
uint8_t *RxBuffer;
uint8_t *TxBuffer;
uint32_t RxLength;
uint32_t TxLength;
__IO uint32_t TxState;
__IO uint32_t RxState;
} USBD_CDC_HandleTypeDef;
/** @defgroup USBD_CORE_Exported_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Exported_Variables
* @{
*/
extern USBD_ClassTypeDef USBD_CDC;
#define USBD_CDC_CLASS &USBD_CDC
/**
* @}
*/
/** @defgroup USB_CORE_Exported_Functions
* @{
*/
uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev,
USBD_CDC_ItfTypeDef *fops);
uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff,
uint32_t length);
uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff);
uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev);
uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USB_CDC_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,45 @@
/**
******************************************************************************
* @file usbd_cdc_if_template.h
* @author MCD Application Team
* @brief Header for usbd_cdc_if_template.c file.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_CDC_IF_TEMPLATE_H
#define __USBD_CDC_IF_TEMPLATE_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_cdc.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
extern USBD_CDC_ItfTypeDef USBD_CDC_Template_fops;
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
#ifdef __cplusplus
}
#endif
#endif /* __USBD_CDC_IF_TEMPLATE_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,968 @@
/**
******************************************************************************
* @file usbd_cdc.c
* @author MCD Application Team
* @brief This file provides the high layer firmware functions to manage the
* following functionalities of the USB CDC Class:
* - Initialization and Configuration of high and low layer
* - Enumeration as CDC Device (and enumeration for each implemented memory interface)
* - OUT/IN data transfer
* - Command IN transfer (class requests management)
* - Error management
*
* @verbatim
*
* ===================================================================
* CDC Class Driver Description
* ===================================================================
* This driver manages the "Universal Serial Bus Class Definitions for Communications Devices
* Revision 1.2 November 16, 2007" and the sub-protocol specification of "Universal Serial Bus
* Communications Class Subclass Specification for PSTN Devices Revision 1.2 February 9, 2007"
* This driver implements the following aspects of the specification:
* - Device descriptor management
* - Configuration descriptor management
* - Enumeration as CDC device with 2 data endpoints (IN and OUT) and 1 command endpoint (IN)
* - Requests management (as described in section 6.2 in specification)
* - Abstract Control Model compliant
* - Union Functional collection (using 1 IN endpoint for control)
* - Data interface class
*
* These aspects may be enriched or modified for a specific user application.
*
* This driver doesn't implement the following aspects of the specification
* (but it is possible to manage these features with some modifications on this driver):
* - Any class-specific aspect relative to communication classes should be managed by user application.
* - All communication classes other than PSTN are not managed
*
* @endverbatim
*
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* BSPDependencies
- "stm32xxxxx_{eval}{discovery}{nucleo_144}.c"
- "stm32xxxxx_{eval}{discovery}_io.c"
EndBSPDependencies */
/* Includes ------------------------------------------------------------------*/
#include "usbd_cdc.h"
#include "usbd_ctlreq.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_CDC
* @brief usbd core module
* @{
*/
/** @defgroup USBD_CDC_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CDC_Private_Defines
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CDC_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CDC_Private_FunctionPrototypes
* @{
*/
static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx);
static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx);
static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum);
static uint8_t USBD_CDC_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum);
static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev);
static uint8_t *USBD_CDC_GetFSCfgDesc(uint16_t *length);
static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length);
static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length);
static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length);
uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length);
/* USB Standard Device Descriptor */
__ALIGN_BEGIN static uint8_t USBD_CDC_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC] __ALIGN_END =
{
USB_LEN_DEV_QUALIFIER_DESC,
USB_DESC_TYPE_DEVICE_QUALIFIER,
0x00,
0x02,
0x00,
0x00,
0x00,
0x40,
0x01,
0x00,
};
/**
* @}
*/
/** @defgroup USBD_CDC_Private_Variables
* @{
*/
/* CDC interface class callbacks structure */
USBD_ClassTypeDef USBD_CDC =
{
USBD_CDC_Init,
USBD_CDC_DeInit,
USBD_CDC_Setup,
NULL, /* EP0_TxSent, */
USBD_CDC_EP0_RxReady,
USBD_CDC_DataIn,
USBD_CDC_DataOut,
NULL,
NULL,
NULL,
USBD_CDC_GetHSCfgDesc,
USBD_CDC_GetFSCfgDesc,
USBD_CDC_GetOtherSpeedCfgDesc,
USBD_CDC_GetDeviceQualifierDescriptor,
};
/* USB CDC device Configuration Descriptor */
__ALIGN_BEGIN static uint8_t USBD_CDC_CfgHSDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END =
{
/* Configuration Descriptor */
0x09, /* bLength: Configuration Descriptor size */
USB_DESC_TYPE_CONFIGURATION, /* bDescriptorType: Configuration */
USB_CDC_CONFIG_DESC_SIZ, /* wTotalLength:no of returned bytes */
0x00,
0x02, /* bNumInterfaces: 2 interface */
0x01, /* bConfigurationValue: Configuration value */
0x00, /* iConfiguration: Index of string descriptor describing the configuration */
#if (USBD_SELF_POWERED == 1U)
0xC0, /* bmAttributes: Bus Powered according to user configuration */
#else
0x80, /* bmAttributes: Bus Powered according to user configuration */
#endif
USBD_MAX_POWER, /* MaxPower 100 mA */
/*---------------------------------------------------------------------------*/
/* Interface Descriptor */
0x09, /* bLength: Interface Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: Interface */
0x00, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x01, /* bNumEndpoints: One endpoints used */
0x02, /* bInterfaceClass: Communication Interface Class */
0x02, /* bInterfaceSubClass: Abstract Control Model */
0x01, /* bInterfaceProtocol: Common AT commands */
0x00, /* iInterface: */
/* 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 */
/* Union Functional Descriptor */
0x05, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x06, /* bDescriptorSubtype: Union func desc */
0x00, /* bMasterInterface: Communication class interface */
0x01, /* bSlaveInterface0: Data Class Interface */
/* Endpoint 2 Descriptor */
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_CMD_EP, /* bEndpointAddress */
0x03, /* bmAttributes: Interrupt */
LOBYTE(CDC_CMD_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_CMD_PACKET_SIZE),
CDC_HS_BINTERVAL, /* bInterval: */
/*---------------------------------------------------------------------------*/
/* Data class interface descriptor */
0x09, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: */
0x01, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints: Two endpoints used */
0x0A, /* bInterfaceClass: CDC */
0x00, /* bInterfaceSubClass: */
0x00, /* bInterfaceProtocol: */
0x00, /* iInterface: */
/* Endpoint OUT Descriptor */
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_OUT_EP, /* bEndpointAddress */
0x02, /* bmAttributes: Bulk */
LOBYTE(CDC_DATA_HS_MAX_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_DATA_HS_MAX_PACKET_SIZE),
0x00, /* bInterval: ignore for Bulk transfer */
/* Endpoint IN Descriptor */
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_IN_EP, /* bEndpointAddress */
0x02, /* bmAttributes: Bulk */
LOBYTE(CDC_DATA_HS_MAX_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_DATA_HS_MAX_PACKET_SIZE),
0x00 /* bInterval: ignore for Bulk transfer */
};
/* USB CDC device Configuration Descriptor */
__ALIGN_BEGIN static uint8_t USBD_CDC_CfgFSDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END =
{
/* Configuration Descriptor */
0x09, /* bLength: Configuration Descriptor size */
USB_DESC_TYPE_CONFIGURATION, /* bDescriptorType: Configuration */
USB_CDC_CONFIG_DESC_SIZ, /* wTotalLength:no of returned bytes */
0x00,
0x02, /* bNumInterfaces: 2 interface */
0x01, /* bConfigurationValue: Configuration value */
0x00, /* iConfiguration: Index of string descriptor describing the configuration */
#if (USBD_SELF_POWERED == 1U)
0xC0, /* bmAttributes: Bus Powered according to user configuration */
#else
0x80, /* bmAttributes: Bus Powered according to user configuration */
#endif
USBD_MAX_POWER, /* MaxPower 100 mA */
/*---------------------------------------------------------------------------*/
/* Interface Descriptor */
0x09, /* bLength: Interface Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: Interface */
/* Interface descriptor type */
0x00, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x01, /* bNumEndpoints: One endpoints used */
0x02, /* bInterfaceClass: Communication Interface Class */
0x02, /* bInterfaceSubClass: Abstract Control Model */
0x01, /* bInterfaceProtocol: Common AT commands */
0x00, /* iInterface: */
/* 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 */
/* Union Functional Descriptor */
0x05, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x06, /* bDescriptorSubtype: Union func desc */
0x00, /* bMasterInterface: Communication class interface */
0x01, /* bSlaveInterface0: Data Class Interface */
/* Endpoint 2 Descriptor */
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_CMD_EP, /* bEndpointAddress */
0x03, /* bmAttributes: Interrupt */
LOBYTE(CDC_CMD_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_CMD_PACKET_SIZE),
CDC_FS_BINTERVAL, /* bInterval: */
/*---------------------------------------------------------------------------*/
/* Data class interface descriptor */
0x09, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: */
0x01, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints: Two endpoints used */
0x0A, /* bInterfaceClass: CDC */
0x00, /* bInterfaceSubClass: */
0x00, /* bInterfaceProtocol: */
0x00, /* iInterface: */
/* Endpoint OUT Descriptor */
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_OUT_EP, /* bEndpointAddress */
0x02, /* bmAttributes: Bulk */
LOBYTE(CDC_DATA_FS_MAX_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_DATA_FS_MAX_PACKET_SIZE),
0x00, /* bInterval: ignore for Bulk transfer */
/* Endpoint IN Descriptor */
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_IN_EP, /* bEndpointAddress */
0x02, /* bmAttributes: Bulk */
LOBYTE(CDC_DATA_FS_MAX_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_DATA_FS_MAX_PACKET_SIZE),
0x00 /* bInterval: ignore for Bulk transfer */
};
__ALIGN_BEGIN static uint8_t USBD_CDC_OtherSpeedCfgDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END =
{
0x09, /* bLength: Configuration Descriptor size */
USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION,
USB_CDC_CONFIG_DESC_SIZ,
0x00,
0x02, /* bNumInterfaces: 2 interfaces */
0x01, /* bConfigurationValue: */
0x04, /* iConfiguration: */
#if (USBD_SELF_POWERED == 1U)
0xC0, /* bmAttributes: Bus Powered according to user configuration */
#else
0x80, /* bmAttributes: Bus Powered according to user configuration */
#endif
USBD_MAX_POWER, /* MaxPower 100 mA */
/*Interface Descriptor */
0x09, /* bLength: Interface Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: Interface */
/* Interface descriptor type */
0x00, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x01, /* bNumEndpoints: One endpoints used */
0x02, /* bInterfaceClass: Communication Interface Class */
0x02, /* bInterfaceSubClass: Abstract Control Model */
0x01, /* bInterfaceProtocol: Common AT commands */
0x00, /* iInterface: */
/* 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 */
/*Union Functional Descriptor*/
0x05, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x06, /* bDescriptorSubtype: Union func desc */
0x00, /* bMasterInterface: Communication class interface */
0x01, /* bSlaveInterface0: Data Class Interface */
/*Endpoint 2 Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_CMD_EP, /* bEndpointAddress */
0x03, /* bmAttributes: Interrupt */
LOBYTE(CDC_CMD_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_CMD_PACKET_SIZE),
CDC_FS_BINTERVAL, /* bInterval: */
/*---------------------------------------------------------------------------*/
/*Data class interface descriptor*/
0x09, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: */
0x01, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints: Two endpoints used */
0x0A, /* bInterfaceClass: CDC */
0x00, /* bInterfaceSubClass: */
0x00, /* bInterfaceProtocol: */
0x00, /* iInterface: */
/*Endpoint OUT Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_OUT_EP, /* bEndpointAddress */
0x02, /* bmAttributes: Bulk */
0x40, /* wMaxPacketSize: */
0x00,
0x00, /* bInterval: ignore for Bulk transfer */
/*Endpoint IN Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_IN_EP, /* bEndpointAddress */
0x02, /* bmAttributes: Bulk */
0x40, /* wMaxPacketSize: */
0x00,
0x00 /* bInterval */
};
/**
* @}
*/
/** @defgroup USBD_CDC_Private_Functions
* @{
*/
/**
* @brief USBD_CDC_Init
* Initialize the CDC interface
* @param pdev: device instance
* @param cfgidx: Configuration index
* @retval status
*/
static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
{
UNUSED(cfgidx);
USBD_CDC_HandleTypeDef *hcdc;
hcdc = USBD_malloc(sizeof(USBD_CDC_HandleTypeDef));
if (hcdc == NULL)
{
pdev->pClassData = NULL;
return (uint8_t)USBD_EMEM;
}
pdev->pClassData = (void *)hcdc;
if (pdev->dev_speed == USBD_SPEED_HIGH)
{
/* Open EP IN */
(void)USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
CDC_DATA_HS_IN_PACKET_SIZE);
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
/* Open EP OUT */
(void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
CDC_DATA_HS_OUT_PACKET_SIZE);
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
/* Set bInterval for CDC CMD Endpoint */
pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_HS_BINTERVAL;
}
else
{
/* Open EP IN */
(void)USBD_LL_OpenEP(pdev, CDC_IN_EP, USBD_EP_TYPE_BULK,
CDC_DATA_FS_IN_PACKET_SIZE);
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 1U;
/* Open EP OUT */
(void)USBD_LL_OpenEP(pdev, CDC_OUT_EP, USBD_EP_TYPE_BULK,
CDC_DATA_FS_OUT_PACKET_SIZE);
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 1U;
/* Set bInterval for CMD Endpoint */
pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = CDC_FS_BINTERVAL;
}
/* Open Command IN EP */
(void)USBD_LL_OpenEP(pdev, CDC_CMD_EP, USBD_EP_TYPE_INTR, CDC_CMD_PACKET_SIZE);
pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 1U;
/* Init physical Interface components */
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Init();
/* Init Xfer states */
hcdc->TxState = 0U;
hcdc->RxState = 0U;
if (pdev->dev_speed == USBD_SPEED_HIGH)
{
/* Prepare Out endpoint to receive next packet */
(void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
CDC_DATA_HS_OUT_PACKET_SIZE);
}
else
{
/* Prepare Out endpoint to receive next packet */
(void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
CDC_DATA_FS_OUT_PACKET_SIZE);
}
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_Init
* DeInitialize the CDC layer
* @param pdev: device instance
* @param cfgidx: Configuration index
* @retval status
*/
static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
{
UNUSED(cfgidx);
/* Close EP IN */
(void)USBD_LL_CloseEP(pdev, CDC_IN_EP);
pdev->ep_in[CDC_IN_EP & 0xFU].is_used = 0U;
/* Close EP OUT */
(void)USBD_LL_CloseEP(pdev, CDC_OUT_EP);
pdev->ep_out[CDC_OUT_EP & 0xFU].is_used = 0U;
/* Close Command IN EP */
(void)USBD_LL_CloseEP(pdev, CDC_CMD_EP);
pdev->ep_in[CDC_CMD_EP & 0xFU].is_used = 0U;
pdev->ep_in[CDC_CMD_EP & 0xFU].bInterval = 0U;
/* DeInit physical Interface components */
if (pdev->pClassData != NULL)
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->DeInit();
(void)USBD_free(pdev->pClassData);
pdev->pClassData = NULL;
}
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_Setup
* Handle the CDC specific requests
* @param pdev: instance
* @param req: usb requests
* @retval status
*/
static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev,
USBD_SetupReqTypedef *req)
{
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
uint16_t len;
uint8_t ifalt = 0U;
uint16_t status_info = 0U;
USBD_StatusTypeDef ret = USBD_OK;
if (hcdc == NULL)
{
return (uint8_t)USBD_FAIL;
}
switch (req->bmRequest & USB_REQ_TYPE_MASK)
{
case USB_REQ_TYPE_CLASS:
if (req->wLength != 0U)
{
if ((req->bmRequest & 0x80U) != 0U)
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
(uint8_t *)hcdc->data,
req->wLength);
len = MIN(CDC_REQ_MAX_DATA_SIZE, req->wLength);
(void)USBD_CtlSendData(pdev, (uint8_t *)hcdc->data, len);
}
else
{
hcdc->CmdOpCode = req->bRequest;
hcdc->CmdLength = (uint8_t)req->wLength;
(void)USBD_CtlPrepareRx(pdev, (uint8_t *)hcdc->data, req->wLength);
}
}
else
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(req->bRequest,
(uint8_t *)req, 0U);
}
break;
case USB_REQ_TYPE_STANDARD:
switch (req->bRequest)
{
case USB_REQ_GET_STATUS:
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
(void)USBD_CtlSendData(pdev, (uint8_t *)&status_info, 2U);
}
else
{
USBD_CtlError(pdev, req);
ret = USBD_FAIL;
}
break;
case USB_REQ_GET_INTERFACE:
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
(void)USBD_CtlSendData(pdev, &ifalt, 1U);
}
else
{
USBD_CtlError(pdev, req);
ret = USBD_FAIL;
}
break;
case USB_REQ_SET_INTERFACE:
if (pdev->dev_state != USBD_STATE_CONFIGURED)
{
USBD_CtlError(pdev, req);
ret = USBD_FAIL;
}
break;
case USB_REQ_CLEAR_FEATURE:
break;
default:
USBD_CtlError(pdev, req);
ret = USBD_FAIL;
break;
}
break;
default:
USBD_CtlError(pdev, req);
ret = USBD_FAIL;
break;
}
return (uint8_t)ret;
}
/**
* @brief USBD_CDC_DataIn
* Data sent on non-control IN endpoint
* @param pdev: device instance
* @param epnum: endpoint number
* @retval status
*/
static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum)
{
USBD_CDC_HandleTypeDef *hcdc;
PCD_HandleTypeDef *hpcd = pdev->pData;
if (pdev->pClassData == NULL)
{
return (uint8_t)USBD_FAIL;
}
hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
if ((pdev->ep_in[epnum].total_length > 0U) &&
((pdev->ep_in[epnum].total_length % hpcd->IN_ep[epnum].maxpacket) == 0U))
{
/* Update the packet total length */
pdev->ep_in[epnum].total_length = 0U;
/* Send ZLP */
(void)USBD_LL_Transmit(pdev, epnum, NULL, 0U);
}
else
{
hcdc->TxState = 0U;
if (((USBD_CDC_ItfTypeDef *)pdev->pUserData)->TransmitCplt != NULL)
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->TransmitCplt(hcdc->TxBuffer, &hcdc->TxLength, epnum);
}
}
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_DataOut
* Data received on non-control Out endpoint
* @param pdev: device instance
* @param epnum: endpoint number
* @retval status
*/
static uint8_t USBD_CDC_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum)
{
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
if (pdev->pClassData == NULL)
{
return (uint8_t)USBD_FAIL;
}
/* Get the received data length */
hcdc->RxLength = USBD_LL_GetRxDataSize(pdev, epnum);
/* USB data will be immediately processed, this allow next USB traffic being
NAKed till the end of the application Xfer */
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Receive(hcdc->RxBuffer, &hcdc->RxLength);
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_EP0_RxReady
* Handle EP0 Rx Ready event
* @param pdev: device instance
* @retval status
*/
static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev)
{
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
if (hcdc == NULL)
{
return (uint8_t)USBD_FAIL;
}
if ((pdev->pUserData != NULL) && (hcdc->CmdOpCode != 0xFFU))
{
((USBD_CDC_ItfTypeDef *)pdev->pUserData)->Control(hcdc->CmdOpCode,
(uint8_t *)hcdc->data,
(uint16_t)hcdc->CmdLength);
hcdc->CmdOpCode = 0xFFU;
}
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_GetFSCfgDesc
* Return configuration descriptor
* @param speed : current device speed
* @param length : pointer data length
* @retval pointer to descriptor buffer
*/
static uint8_t *USBD_CDC_GetFSCfgDesc(uint16_t *length)
{
*length = (uint16_t)sizeof(USBD_CDC_CfgFSDesc);
return USBD_CDC_CfgFSDesc;
}
/**
* @brief USBD_CDC_GetHSCfgDesc
* Return configuration descriptor
* @param speed : current device speed
* @param length : pointer data length
* @retval pointer to descriptor buffer
*/
static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length)
{
*length = (uint16_t)sizeof(USBD_CDC_CfgHSDesc);
return USBD_CDC_CfgHSDesc;
}
/**
* @brief USBD_CDC_GetOtherSpeedCfgDesc
* Return configuration descriptor
* @param speed : current device speed
* @param length : pointer data length
* @retval pointer to descriptor buffer
*/
static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length)
{
*length = (uint16_t)sizeof(USBD_CDC_OtherSpeedCfgDesc);
return USBD_CDC_OtherSpeedCfgDesc;
}
/**
* @brief USBD_CDC_GetDeviceQualifierDescriptor
* return Device Qualifier descriptor
* @param length : pointer data length
* @retval pointer to descriptor buffer
*/
uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length)
{
*length = (uint16_t)sizeof(USBD_CDC_DeviceQualifierDesc);
return USBD_CDC_DeviceQualifierDesc;
}
/**
* @brief USBD_CDC_RegisterInterface
* @param pdev: device instance
* @param fops: CD Interface callback
* @retval status
*/
uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev,
USBD_CDC_ItfTypeDef *fops)
{
if (fops == NULL)
{
return (uint8_t)USBD_FAIL;
}
pdev->pUserData = fops;
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_SetTxBuffer
* @param pdev: device instance
* @param pbuff: Tx Buffer
* @retval status
*/
uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev,
uint8_t *pbuff, uint32_t length)
{
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
if (hcdc == NULL)
{
return (uint8_t)USBD_FAIL;
}
hcdc->TxBuffer = pbuff;
hcdc->TxLength = length;
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_SetRxBuffer
* @param pdev: device instance
* @param pbuff: Rx Buffer
* @retval status
*/
uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff)
{
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
if (hcdc == NULL)
{
return (uint8_t)USBD_FAIL;
}
hcdc->RxBuffer = pbuff;
return (uint8_t)USBD_OK;
}
/**
* @brief USBD_CDC_TransmitPacket
* Transmit packet on IN endpoint
* @param pdev: device instance
* @retval status
*/
uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev)
{
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
USBD_StatusTypeDef ret = USBD_BUSY;
if (pdev->pClassData == NULL)
{
return (uint8_t)USBD_FAIL;
}
if (hcdc->TxState == 0U)
{
/* Tx Transfer in progress */
hcdc->TxState = 1U;
/* Update the packet total length */
pdev->ep_in[CDC_IN_EP & 0xFU].total_length = hcdc->TxLength;
/* Transmit next packet */
(void)USBD_LL_Transmit(pdev, CDC_IN_EP, hcdc->TxBuffer, hcdc->TxLength);
ret = USBD_OK;
}
return (uint8_t)ret;
}
/**
* @brief USBD_CDC_ReceivePacket
* prepare OUT Endpoint for reception
* @param pdev: device instance
* @retval status
*/
uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev)
{
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
if (pdev->pClassData == NULL)
{
return (uint8_t)USBD_FAIL;
}
if (pdev->dev_speed == USBD_SPEED_HIGH)
{
/* Prepare Out endpoint to receive next packet */
(void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
CDC_DATA_HS_OUT_PACKET_SIZE);
}
else
{
/* Prepare Out endpoint to receive next packet */
(void)USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, hcdc->RxBuffer,
CDC_DATA_FS_OUT_PACKET_SIZE);
}
return (uint8_t)USBD_OK;
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,248 @@
/**
******************************************************************************
* @file usbd_cdc_if_template.c
* @author MCD Application Team
* @brief Generic media access Layer.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* BSPDependencies
- "stm32xxxxx_{eval}{discovery}{nucleo_144}.c"
- "stm32xxxxx_{eval}{discovery}_io.c"
EndBSPDependencies */
/* Includes ------------------------------------------------------------------*/
#include "usbd_cdc_if_template.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_CDC
* @brief usbd core module
* @{
*/
/** @defgroup USBD_CDC_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CDC_Private_Defines
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CDC_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CDC_Private_FunctionPrototypes
* @{
*/
static int8_t TEMPLATE_Init(void);
static int8_t TEMPLATE_DeInit(void);
static int8_t TEMPLATE_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length);
static int8_t TEMPLATE_Receive(uint8_t *pbuf, uint32_t *Len);
static int8_t TEMPLATE_TransmitCplt(uint8_t *pbuf, uint32_t *Len, uint8_t epnum);
USBD_CDC_ItfTypeDef USBD_CDC_Template_fops =
{
TEMPLATE_Init,
TEMPLATE_DeInit,
TEMPLATE_Control,
TEMPLATE_Receive,
TEMPLATE_TransmitCplt
};
USBD_CDC_LineCodingTypeDef linecoding =
{
115200, /* baud rate*/
0x00, /* stop bits-1*/
0x00, /* parity - none*/
0x08 /* nb. of bits 8*/
};
/* Private functions ---------------------------------------------------------*/
/**
* @brief TEMPLATE_Init
* Initializes the CDC media low layer
* @param None
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t TEMPLATE_Init(void)
{
/*
Add your initialization code here
*/
return (0);
}
/**
* @brief TEMPLATE_DeInit
* DeInitializes the CDC media low layer
* @param None
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t TEMPLATE_DeInit(void)
{
/*
Add your deinitialization code here
*/
return (0);
}
/**
* @brief TEMPLATE_Control
* Manage the CDC class requests
* @param Cmd: Command code
* @param Buf: Buffer containing command data (request parameters)
* @param Len: Number of data to be sent (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t TEMPLATE_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length)
{
switch (cmd)
{
case CDC_SEND_ENCAPSULATED_COMMAND:
/* Add your code here */
break;
case CDC_GET_ENCAPSULATED_RESPONSE:
/* Add your code here */
break;
case CDC_SET_COMM_FEATURE:
/* Add your code here */
break;
case CDC_GET_COMM_FEATURE:
/* Add your code here */
break;
case CDC_CLEAR_COMM_FEATURE:
/* Add your code here */
break;
case CDC_SET_LINE_CODING:
linecoding.bitrate = (uint32_t)(pbuf[0] | (pbuf[1] << 8) | \
(pbuf[2] << 16) | (pbuf[3] << 24));
linecoding.format = pbuf[4];
linecoding.paritytype = pbuf[5];
linecoding.datatype = pbuf[6];
/* Add your code here */
break;
case CDC_GET_LINE_CODING:
pbuf[0] = (uint8_t)(linecoding.bitrate);
pbuf[1] = (uint8_t)(linecoding.bitrate >> 8);
pbuf[2] = (uint8_t)(linecoding.bitrate >> 16);
pbuf[3] = (uint8_t)(linecoding.bitrate >> 24);
pbuf[4] = linecoding.format;
pbuf[5] = linecoding.paritytype;
pbuf[6] = linecoding.datatype;
/* Add your code here */
break;
case CDC_SET_CONTROL_LINE_STATE:
/* Add your code here */
break;
case CDC_SEND_BREAK:
/* Add your code here */
break;
default:
break;
}
return (0);
}
/**
* @brief TEMPLATE_Receive
* Data received over USB OUT endpoint are sent over CDC interface
* through this function.
*
* @note
* This function will issue a NAK packet on any OUT packet received on
* USB endpoint until exiting this function. If you exit this function
* before transfer is complete on CDC interface (ie. using DMA controller)
* it will result in receiving more data while previous ones are still
* not sent.
*
* @param Buf: Buffer of data to be received
* @param Len: Number of data received (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t TEMPLATE_Receive(uint8_t *Buf, uint32_t *Len)
{
UNUSED(Buf);
UNUSED(Len);
return (0);
}
/**
* @brief TEMPLATE_TransmitCplt
* Data transmitted callback
*
* @note
* This function is IN transfer complete callback used to inform user that
* the submitted Data is successfully sent over USB.
*
* @param Buf: Buffer of data to be received
* @param Len: Number of data received (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t TEMPLATE_TransmitCplt(uint8_t *Buf, uint32_t *Len, uint8_t epnum)
{
UNUSED(Buf);
UNUSED(Len);
UNUSED(epnum);
return (0);
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,224 @@
/**
******************************************************************************
* @file usbd_conf_template.h
* @author MCD Application Team
* @brief Header file for the usbd_conf_template.c file
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_CONF_TEMPLATE_H
#define __USBD_CONF_TEMPLATE_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32fxxx.h" /* replace 'stm32xxx' with your HAL driver header filename, ex: stm32f4xx.h */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_CONF
* @brief USB device low level driver configuration file
* @{
*/
/** @defgroup USBD_CONF_Exported_Defines
* @{
*/
#define USBD_MAX_NUM_INTERFACES 1U
#define USBD_MAX_NUM_CONFIGURATION 1U
#define USBD_MAX_STR_DESC_SIZ 0x100U
#define USBD_SELF_POWERED 1U
#define USBD_DEBUG_LEVEL 2U
/* ECM, RNDIS, DFU Class Config */
#define USBD_SUPPORT_USER_STRING_DESC 1U
/* BillBoard Class Config */
#define USBD_CLASS_USER_STRING_DESC 1U
#define USBD_CLASS_BOS_ENABLED 1U
#define USB_BB_MAX_NUM_ALT_MODE 0x2U
/* MSC Class Config */
#define MSC_MEDIA_PACKET 8192U
/* CDC Class Config */
#define USBD_CDC_INTERVAL 2000U
/* DFU Class Config */
#define USBD_DFU_MAX_ITF_NUM 1U
#define USBD_DFU_XFERS_IZE 1024U
/* AUDIO Class Config */
#define USBD_AUDIO_FREQ 22100U
/* CustomHID Class Config */
#define CUSTOM_HID_HS_BINTERVAL 0x05U
#define CUSTOM_HID_FS_BINTERVAL 0x05U
#define USBD_CUSTOMHID_OUTREPORT_BUF_SIZE 0x02U
#define USBD_CUSTOM_HID_REPORT_DESC_SIZE 163U
/* VIDEO Class Config */
#define UVC_1_1 /* #define UVC_1_0 */
/* To be used only with YUY2 and NV12 Video format, shouldn't be defined for MJPEG format */
#define USBD_UVC_FORMAT_UNCOMPRESSED
#ifdef USBD_UVC_FORMAT_UNCOMPRESSED
#define UVC_BITS_PER_PIXEL 12U
#define UVC_UNCOMPRESSED_GUID UVC_GUID_NV12 /* UVC_GUID_YUY2 */
/* refer to Table 3-18 Color Matching Descriptor video class v1.1 */
#define UVC_COLOR_PRIMARIE 0x01U
#define UVC_TFR_CHARACTERISTICS 0x01U
#define UVC_MATRIX_COEFFICIENTS 0x04U
#endif
/* Video Stream frame width and height */
#define UVC_WIDTH 176U
#define UVC_HEIGHT 144U
/* bEndpointAddress in Endpoint Descriptor */
#define UVC_IN_EP 0x81U
#define UVC_CAM_FPS_FS 10U
#define UVC_CAM_FPS_HS 5U
#define UVC_ISO_FS_MPS 512U
#define UVC_ISO_HS_MPS 512U
#define UVC_PACKET_SIZE UVC_ISO_FS_MPS
/* To be used with Device Only IP supporting double buffer mode */
/* #define UVC_HEADER_PACKET_CNT 0x02U */
/* #define UVC_PACKET_SIZE (UVC_ISO_FS_MPS * UVC_HEADER_PACKET_CNT) */
#define UVC_MAX_FRAME_SIZE (UVC_WIDTH * UVC_HEIGHT * 16U / 8U)
/** @defgroup USBD_Exported_Macros
* @{
*/
/* Memory management macros make sure to use static memory allocation */
/** Alias for memory allocation. */
#define USBD_malloc (void *)USBD_static_malloc
/** Alias for memory release. */
#define USBD_free USBD_static_free
/** Alias for memory set. */
#define USBD_memset memset
/** Alias for memory copy. */
#define USBD_memcpy memcpy
/** Alias for delay. */
#define USBD_Delay HAL_Delay
/* DEBUG macros */
#if (USBD_DEBUG_LEVEL > 0U)
#define USBD_UsrLog(...) do { \
printf(__VA_ARGS__); \
printf("\n"); \
} while (0)
#else
#define USBD_UsrLog(...) do {} while (0)
#endif
#if (USBD_DEBUG_LEVEL > 1U)
#define USBD_ErrLog(...) do { \
printf("ERROR: ") ; \
printf(__VA_ARGS__); \
printf("\n"); \
} while (0)
#else
#define USBD_ErrLog(...) do {} while (0)
#endif
#if (USBD_DEBUG_LEVEL > 2U)
#define USBD_DbgLog(...) do { \
printf("DEBUG : ") ; \
printf(__VA_ARGS__); \
printf("\n"); \
} while (0)
#else
#define USBD_DbgLog(...) do {} while (0)
#endif
/**
* @}
*/
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_Types
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_Variables
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_FunctionsPrototype
* @{
*/
/* Exported functions -------------------------------------------------------*/
void *USBD_static_malloc(uint32_t size);
void USBD_static_free(void *p);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USBD_CONF_TEMPLATE_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,158 @@
/**
******************************************************************************
* @file usbd_core.h
* @author MCD Application Team
* @brief Header file for usbd_core.c file
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_CORE_H
#define __USBD_CORE_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_conf.h"
#include "usbd_def.h"
#include "usbd_ioreq.h"
#include "usbd_ctlreq.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_CORE
* @brief This file is the Header file for usbd_core.c file
* @{
*/
/** @defgroup USBD_CORE_Exported_Defines
* @{
*/
#ifndef USBD_DEBUG_LEVEL
#define USBD_DEBUG_LEVEL 0U
#endif /* USBD_DEBUG_LEVEL */
/**
* @}
*/
/** @defgroup USBD_CORE_Exported_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Exported_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Exported_Variables
* @{
*/
#define USBD_SOF USBD_LL_SOF
/**
* @}
*/
/** @defgroup USBD_CORE_Exported_FunctionsPrototype
* @{
*/
USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id);
USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_Stop(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass);
USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx);
USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx);
USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup);
USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata);
USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata);
USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed);
USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum);
USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum);
USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev);
/* USBD Low Level Driver */
USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
uint8_t ep_type, uint16_t ep_mps);
USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr);
USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
uint8_t *pbuf, uint32_t size);
USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
uint8_t *pbuf, uint32_t size);
uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
void USBD_LL_Delay(uint32_t Delay);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USBD_CORE_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,103 @@
/**
******************************************************************************
* @file usbd_req.h
* @author MCD Application Team
* @brief Header file for the usbd_req.c file
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USB_REQUEST_H
#define __USB_REQUEST_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_def.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_REQ
* @brief header file for the usbd_req.c file
* @{
*/
/** @defgroup USBD_REQ_Exported_Defines
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Exported_Types
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Exported_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Exported_Variables
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Exported_FunctionsPrototype
* @{
*/
USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata);
void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USB_REQUEST_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,420 @@
/**
******************************************************************************
* @file usbd_def.h
* @author MCD Application Team
* @brief General defines for the usb device library
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_DEF_H
#define __USBD_DEF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_conf.h"
/** @addtogroup STM32_USBD_DEVICE_LIBRARY
* @{
*/
/** @defgroup USB_DEF
* @brief general defines for the usb device library file
* @{
*/
/** @defgroup USB_DEF_Exported_Defines
* @{
*/
#ifndef NULL
#define NULL 0U
#endif /* NULL */
#ifndef USBD_MAX_NUM_INTERFACES
#define USBD_MAX_NUM_INTERFACES 1U
#endif /* USBD_MAX_NUM_CONFIGURATION */
#ifndef USBD_MAX_NUM_CONFIGURATION
#define USBD_MAX_NUM_CONFIGURATION 1U
#endif /* USBD_MAX_NUM_CONFIGURATION */
#ifndef USBD_LPM_ENABLED
#define USBD_LPM_ENABLED 0U
#endif /* USBD_LPM_ENABLED */
#ifndef USBD_SELF_POWERED
#define USBD_SELF_POWERED 1U
#endif /*USBD_SELF_POWERED */
#ifndef USBD_MAX_POWER
#define USBD_MAX_POWER 0x32U /* 100 mA */
#endif /* USBD_MAX_POWER */
#ifndef USBD_SUPPORT_USER_STRING_DESC
#define USBD_SUPPORT_USER_STRING_DESC 0U
#endif /* USBD_SUPPORT_USER_STRING_DESC */
#ifndef USBD_CLASS_USER_STRING_DESC
#define USBD_CLASS_USER_STRING_DESC 0U
#endif /* USBD_CLASS_USER_STRING_DESC */
#define USB_LEN_DEV_QUALIFIER_DESC 0x0AU
#define USB_LEN_DEV_DESC 0x12U
#define USB_LEN_CFG_DESC 0x09U
#define USB_LEN_IF_DESC 0x09U
#define USB_LEN_EP_DESC 0x07U
#define USB_LEN_OTG_DESC 0x03U
#define USB_LEN_LANGID_STR_DESC 0x04U
#define USB_LEN_OTHER_SPEED_DESC_SIZ 0x09U
#define USBD_IDX_LANGID_STR 0x00U
#define USBD_IDX_MFC_STR 0x01U
#define USBD_IDX_PRODUCT_STR 0x02U
#define USBD_IDX_SERIAL_STR 0x03U
#define USBD_IDX_CONFIG_STR 0x04U
#define USBD_IDX_INTERFACE_STR 0x05U
#define USB_REQ_TYPE_STANDARD 0x00U
#define USB_REQ_TYPE_CLASS 0x20U
#define USB_REQ_TYPE_VENDOR 0x40U
#define USB_REQ_TYPE_MASK 0x60U
#define USB_REQ_RECIPIENT_DEVICE 0x00U
#define USB_REQ_RECIPIENT_INTERFACE 0x01U
#define USB_REQ_RECIPIENT_ENDPOINT 0x02U
#define USB_REQ_RECIPIENT_MASK 0x03U
#define USB_REQ_GET_STATUS 0x00U
#define USB_REQ_CLEAR_FEATURE 0x01U
#define USB_REQ_SET_FEATURE 0x03U
#define USB_REQ_SET_ADDRESS 0x05U
#define USB_REQ_GET_DESCRIPTOR 0x06U
#define USB_REQ_SET_DESCRIPTOR 0x07U
#define USB_REQ_GET_CONFIGURATION 0x08U
#define USB_REQ_SET_CONFIGURATION 0x09U
#define USB_REQ_GET_INTERFACE 0x0AU
#define USB_REQ_SET_INTERFACE 0x0BU
#define USB_REQ_SYNCH_FRAME 0x0CU
#define USB_DESC_TYPE_DEVICE 0x01U
#define USB_DESC_TYPE_CONFIGURATION 0x02U
#define USB_DESC_TYPE_STRING 0x03U
#define USB_DESC_TYPE_INTERFACE 0x04U
#define USB_DESC_TYPE_ENDPOINT 0x05U
#define USB_DESC_TYPE_DEVICE_QUALIFIER 0x06U
#define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION 0x07U
#define USB_DESC_TYPE_IAD 0x0BU
#define USB_DESC_TYPE_BOS 0x0FU
#define USB_CONFIG_REMOTE_WAKEUP 0x02U
#define USB_CONFIG_SELF_POWERED 0x01U
#define USB_FEATURE_EP_HALT 0x00U
#define USB_FEATURE_REMOTE_WAKEUP 0x01U
#define USB_FEATURE_TEST_MODE 0x02U
#define USB_DEVICE_CAPABITY_TYPE 0x10U
#define USB_CONF_DESC_SIZE 0x09U
#define USB_IF_DESC_SIZE 0x09U
#define USB_EP_DESC_SIZE 0x07U
#define USB_IAD_DESC_SIZE 0x08U
#define USB_HS_MAX_PACKET_SIZE 512U
#define USB_FS_MAX_PACKET_SIZE 64U
#define USB_MAX_EP0_SIZE 64U
/* Device Status */
#define USBD_STATE_DEFAULT 0x01U
#define USBD_STATE_ADDRESSED 0x02U
#define USBD_STATE_CONFIGURED 0x03U
#define USBD_STATE_SUSPENDED 0x04U
/* EP0 State */
#define USBD_EP0_IDLE 0x00U
#define USBD_EP0_SETUP 0x01U
#define USBD_EP0_DATA_IN 0x02U
#define USBD_EP0_DATA_OUT 0x03U
#define USBD_EP0_STATUS_IN 0x04U
#define USBD_EP0_STATUS_OUT 0x05U
#define USBD_EP0_STALL 0x06U
#define USBD_EP_TYPE_CTRL 0x00U
#define USBD_EP_TYPE_ISOC 0x01U
#define USBD_EP_TYPE_BULK 0x02U
#define USBD_EP_TYPE_INTR 0x03U
/**
* @}
*/
/** @defgroup USBD_DEF_Exported_TypesDefinitions
* @{
*/
typedef struct usb_setup_req
{
uint8_t bmRequest;
uint8_t bRequest;
uint16_t wValue;
uint16_t wIndex;
uint16_t wLength;
} USBD_SetupReqTypedef;
typedef struct
{
uint8_t bLength;
uint8_t bDescriptorType;
uint16_t wTotalLength;
uint8_t bNumInterfaces;
uint8_t bConfigurationValue;
uint8_t iConfiguration;
uint8_t bmAttributes;
uint8_t bMaxPower;
} USBD_ConfigDescTypedef;
typedef struct
{
uint8_t bLength;
uint8_t bDescriptorType;
uint16_t wTotalLength;
uint8_t bNumDeviceCaps;
} USBD_BosDescTypedef;
typedef struct
{
uint8_t bLength;
uint8_t bDescriptorType;
uint8_t bEndpointAddress;
uint8_t bmAttributes;
uint16_t wMaxPacketSize;
uint8_t bInterval;
} USBD_EpDescTypedef;
struct _USBD_HandleTypeDef;
typedef struct _Device_cb
{
uint8_t (*Init)(struct _USBD_HandleTypeDef *pdev, uint8_t cfgidx);
uint8_t (*DeInit)(struct _USBD_HandleTypeDef *pdev, uint8_t cfgidx);
/* Control Endpoints*/
uint8_t (*Setup)(struct _USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
uint8_t (*EP0_TxSent)(struct _USBD_HandleTypeDef *pdev);
uint8_t (*EP0_RxReady)(struct _USBD_HandleTypeDef *pdev);
/* Class Specific Endpoints*/
uint8_t (*DataIn)(struct _USBD_HandleTypeDef *pdev, uint8_t epnum);
uint8_t (*DataOut)(struct _USBD_HandleTypeDef *pdev, uint8_t epnum);
uint8_t (*SOF)(struct _USBD_HandleTypeDef *pdev);
uint8_t (*IsoINIncomplete)(struct _USBD_HandleTypeDef *pdev, uint8_t epnum);
uint8_t (*IsoOUTIncomplete)(struct _USBD_HandleTypeDef *pdev, uint8_t epnum);
uint8_t *(*GetHSConfigDescriptor)(uint16_t *length);
uint8_t *(*GetFSConfigDescriptor)(uint16_t *length);
uint8_t *(*GetOtherSpeedConfigDescriptor)(uint16_t *length);
uint8_t *(*GetDeviceQualifierDescriptor)(uint16_t *length);
#if (USBD_SUPPORT_USER_STRING_DESC == 1U)
uint8_t *(*GetUsrStrDescriptor)(struct _USBD_HandleTypeDef *pdev, uint8_t index, uint16_t *length);
#endif
} USBD_ClassTypeDef;
/* Following USB Device Speed */
typedef enum
{
USBD_SPEED_HIGH = 0U,
USBD_SPEED_FULL = 1U,
USBD_SPEED_LOW = 2U,
} USBD_SpeedTypeDef;
/* Following USB Device status */
typedef enum
{
USBD_OK = 0U,
USBD_BUSY,
USBD_EMEM,
USBD_FAIL,
} USBD_StatusTypeDef;
/* USB Device descriptors structure */
typedef struct
{
uint8_t *(*GetDeviceDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *(*GetLangIDStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *(*GetManufacturerStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *(*GetProductStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *(*GetSerialStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *(*GetConfigurationStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *(*GetInterfaceStrDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
#if (USBD_CLASS_USER_STRING_DESC == 1)
uint8_t *(*GetUserStrDescriptor)(USBD_SpeedTypeDef speed, uint8_t idx, uint16_t *length);
#endif
#if ((USBD_LPM_ENABLED == 1U) || (USBD_CLASS_BOS_ENABLED == 1))
uint8_t *(*GetBOSDescriptor)(USBD_SpeedTypeDef speed, uint16_t *length);
#endif
} USBD_DescriptorsTypeDef;
/* USB Device handle structure */
typedef struct
{
uint32_t status;
uint32_t total_length;
uint32_t rem_length;
uint32_t maxpacket;
uint16_t is_used;
uint16_t bInterval;
} USBD_EndpointTypeDef;
/* USB Device handle structure */
typedef struct _USBD_HandleTypeDef
{
uint8_t id;
uint32_t dev_config;
uint32_t dev_default_config;
uint32_t dev_config_status;
USBD_SpeedTypeDef dev_speed;
USBD_EndpointTypeDef ep_in[16];
USBD_EndpointTypeDef ep_out[16];
__IO uint32_t ep0_state;
uint32_t ep0_data_len;
__IO uint8_t dev_state;
__IO uint8_t dev_old_state;
uint8_t dev_address;
uint8_t dev_connection_status;
uint8_t dev_test_mode;
uint32_t dev_remote_wakeup;
uint8_t ConfIdx;
USBD_SetupReqTypedef request;
USBD_DescriptorsTypeDef *pDesc;
USBD_ClassTypeDef *pClass;
void *pClassData;
void *pUserData;
void *pData;
void *pBosDesc;
void *pConfDesc;
} USBD_HandleTypeDef;
/**
* @}
*/
/** @defgroup USBD_DEF_Exported_Macros
* @{
*/
__STATIC_INLINE uint16_t SWAPBYTE(uint8_t *addr)
{
uint16_t _SwapVal, _Byte1, _Byte2;
uint8_t *_pbuff = addr;
_Byte1 = *(uint8_t *)_pbuff;
_pbuff++;
_Byte2 = *(uint8_t *)_pbuff;
_SwapVal = (_Byte2 << 8) | _Byte1;
return _SwapVal;
}
#ifndef LOBYTE
#define LOBYTE(x) ((uint8_t)((x) & 0x00FFU))
#endif
#ifndef HIBYTE
#define HIBYTE(x) ((uint8_t)(((x) & 0xFF00U) >> 8U))
#endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#if defined ( __GNUC__ )
#ifndef __weak
#define __weak __attribute__((weak))
#endif /* __weak */
#ifndef __packed
#define __packed __attribute__((__packed__))
#endif /* __packed */
#endif /* __GNUC__ */
/* In HS mode and when the DMA is used, all variables and data structures dealing
with the DMA during the transaction process should be 4-bytes aligned */
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
#ifndef __ALIGN_END
#define __ALIGN_END __attribute__ ((aligned (4U)))
#endif /* __ALIGN_END */
#ifndef __ALIGN_BEGIN
#define __ALIGN_BEGIN
#endif /* __ALIGN_BEGIN */
#else
#ifndef __ALIGN_END
#define __ALIGN_END
#endif /* __ALIGN_END */
#ifndef __ALIGN_BEGIN
#if defined (__CC_ARM) /* ARM Compiler */
#define __ALIGN_BEGIN __align(4U)
#elif defined (__ICCARM__) /* IAR Compiler */
#define __ALIGN_BEGIN
#endif /* __CC_ARM */
#endif /* __ALIGN_BEGIN */
#endif /* __GNUC__ */
/**
* @}
*/
/** @defgroup USBD_DEF_Exported_Variables
* @{
*/
/**
* @}
*/
/** @defgroup USBD_DEF_Exported_FunctionsPrototype
* @{
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USBD_DEF_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,63 @@
/**
******************************************************************************
* @file usbd_desc_template.h
* @author MCD Application Team
* @brief Header for usbd_desc_template.c module
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_DESC_TEMPLATE_H
#define __USBD_DESC_TEMPLATE_H
/* Includes ------------------------------------------------------------------*/
#include "usbd_def.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define DEVICE_ID1 (UID_BASE)
#define DEVICE_ID2 (UID_BASE + 0x4U)
#define DEVICE_ID3 (UID_BASE + 0x8U)
/*
* USB Billboard Class USER string desc Defines Template
* index should start form 0x10 to avoid using the reserved device string desc indexes
*/
#if (USBD_CLASS_USER_STRING_DESC == 1)
#define USBD_BB_IF_STRING_INDEX 0x10U
#define USBD_BB_URL_STRING_INDEX 0x11U
#define USBD_BB_ALTMODE0_STRING_INDEX 0x12U
#define USBD_BB_ALTMODE1_STRING_INDEX 0x13U
/* Add Specific USER string Desc */
#define USBD_BB_IF_STR_DESC (uint8_t *)"STM32 BillBoard Interface"
#define USBD_BB_URL_STR_DESC (uint8_t *)"www.st.com"
#define USBD_BB_ALTMODE0_STR_DESC (uint8_t *)"STM32 Alternate0 Mode"
#define USBD_BB_ALTMODE1_STR_DESC (uint8_t *)"STM32 Alternate1 Mode"
#endif
#define USB_SIZ_STRING_SERIAL 0x1AU
#if (USBD_LPM_ENABLED == 1)
#define USB_SIZ_BOS_DESC 0x0CU
#elif (USBD_CLASS_BOS_ENABLED == 1)
#define USB_SIZ_BOS_DESC 0x5DU
#endif
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
extern USBD_DescriptorsTypeDef XXX_Desc; /* Replace 'XXX_Desc' with your active USB device class, ex: HID_Desc */
#endif /* __USBD_DESC_TEMPLATE_H*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,114 @@
/**
******************************************************************************
* @file usbd_ioreq.h
* @author MCD Application Team
* @brief Header file for the usbd_ioreq.c file
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_IOREQ_H
#define __USBD_IOREQ_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_def.h"
#include "usbd_core.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_IOREQ
* @brief header file for the usbd_ioreq.c file
* @{
*/
/** @defgroup USBD_IOREQ_Exported_Defines
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Exported_Types
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Exported_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Exported_Variables
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Exported_FunctionsPrototype
* @{
*/
USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len);
USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len);
USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len);
USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len);
USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev);
USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev);
uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USBD_IOREQ_H */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,268 @@
/**
******************************************************************************
* @file usbd_conf_template.c
* @author MCD Application Team
* @brief USB Device configuration and interface file
* This template should be copied to the user folder,
* renamed and customized following user needs.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "usbd_core.h"
#include "usbd_hid.h" /* Include class header file */
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/**
* @brief Initializes the Low Level portion of the Device driver.
* @param pdev: Device handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
{
UNUSED(pdev);
return USBD_OK;
}
/**
* @brief De-Initializes the Low Level portion of the Device driver.
* @param pdev: Device handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev)
{
UNUSED(pdev);
return USBD_OK;
}
/**
* @brief Starts the Low Level portion of the Device driver.
* @param pdev: Device handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
{
UNUSED(pdev);
return USBD_OK;
}
/**
* @brief Stops the Low Level portion of the Device driver.
* @param pdev: Device handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
{
UNUSED(pdev);
return USBD_OK;
}
/**
* @brief Opens an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @param ep_type: Endpoint Type
* @param ep_mps: Endpoint Max Packet Size
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
uint8_t ep_type, uint16_t ep_mps)
{
UNUSED(pdev);
UNUSED(ep_addr);
UNUSED(ep_type);
UNUSED(ep_mps);
return USBD_OK;
}
/**
* @brief Closes an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
UNUSED(pdev);
UNUSED(ep_addr);
return USBD_OK;
}
/**
* @brief Flushes an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
UNUSED(pdev);
UNUSED(ep_addr);
return USBD_OK;
}
/**
* @brief Sets a Stall condition on an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
UNUSED(pdev);
UNUSED(ep_addr);
return USBD_OK;
}
/**
* @brief Clears a Stall condition on an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev,
uint8_t ep_addr)
{
UNUSED(pdev);
UNUSED(ep_addr);
return USBD_OK;
}
/**
* @brief Returns Stall condition.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @retval Stall (1: Yes, 0: No)
*/
uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
UNUSED(pdev);
UNUSED(ep_addr);
return 0U;
}
/**
* @brief Assigns a USB address to the device.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev,
uint8_t dev_addr)
{
UNUSED(pdev);
UNUSED(ep_addr);
return USBD_OK;
}
/**
* @brief Transmits data over an endpoint.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @param pbuf: Pointer to data to be sent
* @param size: Data size
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
uint8_t *pbuf, uint32_t size)
{
UNUSED(pdev);
UNUSED(ep_addr);
UNUSED(pbuf);
UNUSED(size);
return USBD_OK;
}
/**
* @brief Prepares an endpoint for reception.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @param pbuf: Pointer to data to be received
* @param size: Data size
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev,
uint8_t ep_addr, uint8_t *pbuf,
uint32_t size)
{
UNUSED(pdev);
UNUSED(ep_addr);
UNUSED(pbuf);
UNUSED(size);
return USBD_OK;
}
/**
* @brief Returns the last transferred packet size.
* @param pdev: Device handle
* @param ep_addr: Endpoint Number
* @retval Received Data Size
*/
uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
UNUSED(pdev);
UNUSED(ep_addr);
return 0U;
}
/**
* @brief Static single allocation.
* @param size: Size of allocated memory
* @retval None
*/
void *USBD_static_malloc(uint32_t size)
{
static uint32_t mem[(sizeof(USBD_HID_HandleTypeDef) / 4) + 1]; /* On 32-bit boundary */
return mem;
}
/**
* @brief Dummy memory free
* @param p: Pointer to allocated memory address
* @retval None
*/
void USBD_static_free(void *p)
{
}
/**
* @brief Delays routine for the USB Device Library.
* @param Delay: Delay in ms
* @retval None
*/
void USBD_LL_Delay(uint32_t Delay)
{
UNUSED(Delay);
}
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,694 @@
/**
******************************************************************************
* @file usbd_core.c
* @author MCD Application Team
* @brief This file provides all the USBD core functions.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "usbd_core.h"
/** @addtogroup STM32_USBD_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_CORE
* @brief usbd core module
* @{
*/
/** @defgroup USBD_CORE_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Private_Defines
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Private_FunctionPrototypes
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Private_Variables
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CORE_Private_Functions
* @{
*/
/**
* @brief USBD_Init
* Initializes the device stack and load the class driver
* @param pdev: device instance
* @param pdesc: Descriptor structure address
* @param id: Low level core index
* @retval None
*/
USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev,
USBD_DescriptorsTypeDef *pdesc, uint8_t id)
{
USBD_StatusTypeDef ret;
/* Check whether the USB Host handle is valid */
if (pdev == NULL)
{
#if (USBD_DEBUG_LEVEL > 1U)
USBD_ErrLog("Invalid Device handle");
#endif
return USBD_FAIL;
}
/* Unlink previous class resources */
pdev->pClass = NULL;
pdev->pUserData = NULL;
pdev->pConfDesc = NULL;
/* Assign USBD Descriptors */
if (pdesc != NULL)
{
pdev->pDesc = pdesc;
}
/* Set Device initial State */
pdev->dev_state = USBD_STATE_DEFAULT;
pdev->id = id;
/* Initialize low level driver */
ret = USBD_LL_Init(pdev);
return ret;
}
/**
* @brief USBD_DeInit
* Re-Initialize the device library
* @param pdev: device instance
* @retval status: status
*/
USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev)
{
USBD_StatusTypeDef ret;
/* Disconnect the USB Device */
(void)USBD_LL_Stop(pdev);
/* Set Default State */
pdev->dev_state = USBD_STATE_DEFAULT;
/* Free Class Resources */
if (pdev->pClass != NULL)
{
pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
pdev->pClass = NULL;
pdev->pUserData = NULL;
}
/* Free Device descriptors resources */
pdev->pDesc = NULL;
pdev->pConfDesc = NULL;
/* DeInitialize low level driver */
ret = USBD_LL_DeInit(pdev);
return ret;
}
/**
* @brief USBD_RegisterClass
* Link class driver to Device Core.
* @param pDevice : Device Handle
* @param pclass: Class handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass)
{
uint16_t len = 0U;
if (pclass == NULL)
{
#if (USBD_DEBUG_LEVEL > 1U)
USBD_ErrLog("Invalid Class handle");
#endif
return USBD_FAIL;
}
/* link the class to the USB Device handle */
pdev->pClass = pclass;
/* Get Device Configuration Descriptor */
#ifdef USE_USB_HS
if (pdev->pClass->GetHSConfigDescriptor != NULL)
{
pdev->pConfDesc = (void *)pdev->pClass->GetHSConfigDescriptor(&len);
}
#else /* Default USE_USB_FS */
if (pdev->pClass->GetFSConfigDescriptor != NULL)
{
pdev->pConfDesc = (void *)pdev->pClass->GetFSConfigDescriptor(&len);
}
#endif /* USE_USB_FS */
return USBD_OK;
}
/**
* @brief USBD_Start
* Start the USB Device Core.
* @param pdev: Device Handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev)
{
/* Start the low level driver */
return USBD_LL_Start(pdev);
}
/**
* @brief USBD_Stop
* Stop the USB Device Core.
* @param pdev: Device Handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_Stop(USBD_HandleTypeDef *pdev)
{
/* Disconnect USB Device */
(void)USBD_LL_Stop(pdev);
/* Free Class Resources */
if (pdev->pClass != NULL)
{
(void)pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
}
return USBD_OK;
}
/**
* @brief USBD_RunTestMode
* Launch test mode process
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev)
{
/* Prevent unused argument compilation warning */
UNUSED(pdev);
return USBD_OK;
}
/**
* @brief USBD_SetClassConfig
* Configure device and start the interface
* @param pdev: device instance
* @param cfgidx: configuration index
* @retval status
*/
USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
{
USBD_StatusTypeDef ret = USBD_FAIL;
if (pdev->pClass != NULL)
{
/* Set configuration and Start the Class */
ret = (USBD_StatusTypeDef)pdev->pClass->Init(pdev, cfgidx);
}
return ret;
}
/**
* @brief USBD_ClrClassConfig
* Clear current configuration
* @param pdev: device instance
* @param cfgidx: configuration index
* @retval status: USBD_StatusTypeDef
*/
USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
{
/* Clear configuration and De-initialize the Class process */
if (pdev->pClass != NULL)
{
pdev->pClass->DeInit(pdev, cfgidx);
}
return USBD_OK;
}
/**
* @brief USBD_LL_SetupStage
* Handle the setup stage
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup)
{
USBD_StatusTypeDef ret;
USBD_ParseSetupRequest(&pdev->request, psetup);
pdev->ep0_state = USBD_EP0_SETUP;
pdev->ep0_data_len = pdev->request.wLength;
switch (pdev->request.bmRequest & 0x1FU)
{
case USB_REQ_RECIPIENT_DEVICE:
ret = USBD_StdDevReq(pdev, &pdev->request);
break;
case USB_REQ_RECIPIENT_INTERFACE:
ret = USBD_StdItfReq(pdev, &pdev->request);
break;
case USB_REQ_RECIPIENT_ENDPOINT:
ret = USBD_StdEPReq(pdev, &pdev->request);
break;
default:
ret = USBD_LL_StallEP(pdev, (pdev->request.bmRequest & 0x80U));
break;
}
return ret;
}
/**
* @brief USBD_LL_DataOutStage
* Handle data OUT stage
* @param pdev: device instance
* @param epnum: endpoint index
* @param pdata: data pointer
* @retval status
*/
USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev,
uint8_t epnum, uint8_t *pdata)
{
USBD_EndpointTypeDef *pep;
USBD_StatusTypeDef ret;
if (epnum == 0U)
{
pep = &pdev->ep_out[0];
if (pdev->ep0_state == USBD_EP0_DATA_OUT)
{
if (pep->rem_length > pep->maxpacket)
{
pep->rem_length -= pep->maxpacket;
(void)USBD_CtlContinueRx(pdev, pdata, MIN(pep->rem_length, pep->maxpacket));
}
else
{
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
if (pdev->pClass->EP0_RxReady != NULL)
{
pdev->pClass->EP0_RxReady(pdev);
}
}
(void)USBD_CtlSendStatus(pdev);
}
}
else
{
#if 0
if (pdev->ep0_state == USBD_EP0_STATUS_OUT)
{
/*
* STATUS PHASE completed, update ep0_state to idle
*/
pdev->ep0_state = USBD_EP0_IDLE;
(void)USBD_LL_StallEP(pdev, 0U);
}
#endif
}
}
else
{
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
if (pdev->pClass->DataOut != NULL)
{
ret = (USBD_StatusTypeDef)pdev->pClass->DataOut(pdev, epnum);
if (ret != USBD_OK)
{
return ret;
}
}
}
}
return USBD_OK;
}
/**
* @brief USBD_LL_DataInStage
* Handle data in stage
* @param pdev: device instance
* @param epnum: endpoint index
* @retval status
*/
USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev,
uint8_t epnum, uint8_t *pdata)
{
USBD_EndpointTypeDef *pep;
USBD_StatusTypeDef ret;
if (epnum == 0U)
{
pep = &pdev->ep_in[0];
if (pdev->ep0_state == USBD_EP0_DATA_IN)
{
if (pep->rem_length > pep->maxpacket)
{
pep->rem_length -= pep->maxpacket;
(void)USBD_CtlContinueSendData(pdev, pdata, pep->rem_length);
/* Prepare endpoint for premature end of transfer */
(void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
}
else
{
/* last packet is MPS multiple, so send ZLP packet */
if ((pep->maxpacket == pep->rem_length) &&
(pep->total_length >= pep->maxpacket) &&
(pep->total_length < pdev->ep0_data_len))
{
(void)USBD_CtlContinueSendData(pdev, NULL, 0U);
pdev->ep0_data_len = 0U;
/* Prepare endpoint for premature end of transfer */
(void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
}
else
{
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
if (pdev->pClass->EP0_TxSent != NULL)
{
pdev->pClass->EP0_TxSent(pdev);
}
}
(void)USBD_LL_StallEP(pdev, 0x80U);
(void)USBD_CtlReceiveStatus(pdev);
}
}
}
else
{
#if 0
if ((pdev->ep0_state == USBD_EP0_STATUS_IN) ||
(pdev->ep0_state == USBD_EP0_IDLE))
{
(void)USBD_LL_StallEP(pdev, 0x80U);
}
#endif
}
if (pdev->dev_test_mode == 1U)
{
(void)USBD_RunTestMode(pdev);
pdev->dev_test_mode = 0U;
}
}
else
{
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
if (pdev->pClass->DataIn != NULL)
{
ret = (USBD_StatusTypeDef)pdev->pClass->DataIn(pdev, epnum);
if (ret != USBD_OK)
{
return ret;
}
}
}
}
return USBD_OK;
}
/**
* @brief USBD_LL_Reset
* Handle Reset event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev)
{
/* Upon Reset call user call back */
pdev->dev_state = USBD_STATE_DEFAULT;
pdev->ep0_state = USBD_EP0_IDLE;
pdev->dev_config = 0U;
pdev->dev_remote_wakeup = 0U;
if (pdev->pClass == NULL)
{
return USBD_FAIL;
}
if (pdev->pClassData != NULL)
{
if (pdev->pClass->DeInit != NULL)
{
(void)pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
}
}
/* Open EP0 OUT */
(void)USBD_LL_OpenEP(pdev, 0x00U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE);
pdev->ep_out[0x00U & 0xFU].is_used = 1U;
pdev->ep_out[0].maxpacket = USB_MAX_EP0_SIZE;
/* Open EP0 IN */
(void)USBD_LL_OpenEP(pdev, 0x80U, USBD_EP_TYPE_CTRL, USB_MAX_EP0_SIZE);
pdev->ep_in[0x80U & 0xFU].is_used = 1U;
pdev->ep_in[0].maxpacket = USB_MAX_EP0_SIZE;
return USBD_OK;
}
/**
* @brief USBD_LL_SetSpeed
* Handle Reset event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev,
USBD_SpeedTypeDef speed)
{
pdev->dev_speed = speed;
return USBD_OK;
}
/**
* @brief USBD_LL_Suspend
* Handle Suspend event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev)
{
pdev->dev_old_state = pdev->dev_state;
pdev->dev_state = USBD_STATE_SUSPENDED;
return USBD_OK;
}
/**
* @brief USBD_LL_Resume
* Handle Resume event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev)
{
if (pdev->dev_state == USBD_STATE_SUSPENDED)
{
pdev->dev_state = pdev->dev_old_state;
}
return USBD_OK;
}
/**
* @brief USBD_LL_SOF
* Handle SOF event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev)
{
if (pdev->pClass == NULL)
{
return USBD_FAIL;
}
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
if (pdev->pClass->SOF != NULL)
{
(void)pdev->pClass->SOF(pdev);
}
}
return USBD_OK;
}
/**
* @brief USBD_LL_IsoINIncomplete
* Handle iso in incomplete event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev,
uint8_t epnum)
{
if (pdev->pClass == NULL)
{
return USBD_FAIL;
}
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
if (pdev->pClass->IsoINIncomplete != NULL)
{
(void)pdev->pClass->IsoINIncomplete(pdev, epnum);
}
}
return USBD_OK;
}
/**
* @brief USBD_LL_IsoOUTIncomplete
* Handle iso out incomplete event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev,
uint8_t epnum)
{
if (pdev->pClass == NULL)
{
return USBD_FAIL;
}
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
if (pdev->pClass->IsoOUTIncomplete != NULL)
{
(void)pdev->pClass->IsoOUTIncomplete(pdev, epnum);
}
}
return USBD_OK;
}
/**
* @brief USBD_LL_DevConnected
* Handle device connection event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev)
{
/* Prevent unused argument compilation warning */
UNUSED(pdev);
return USBD_OK;
}
/**
* @brief USBD_LL_DevDisconnected
* Handle device disconnection event
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev)
{
/* Free Class Resources */
pdev->dev_state = USBD_STATE_DEFAULT;
if (pdev->pClass != NULL)
{
(void)pdev->pClass->DeInit(pdev, (uint8_t)pdev->dev_config);
}
return USBD_OK;
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,948 @@
/**
******************************************************************************
* @file usbd_req.c
* @author MCD Application Team
* @brief This file provides the standard USB requests following chapter 9.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "usbd_ctlreq.h"
#include "usbd_ioreq.h"
/** @addtogroup STM32_USBD_STATE_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_REQ
* @brief USB standard requests module
* @{
*/
/** @defgroup USBD_REQ_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Private_Defines
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Private_Variables
* @{
*/
/**
* @}
*/
/** @defgroup USBD_REQ_Private_FunctionPrototypes
* @{
*/
static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static void USBD_SetAddress(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static USBD_StatusTypeDef USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static void USBD_ClrFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
static uint8_t USBD_GetLen(uint8_t *buf);
/**
* @}
*/
/** @defgroup USBD_REQ_Private_Functions
* @{
*/
/**
* @brief USBD_StdDevReq
* Handle standard usb device requests
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
USBD_StatusTypeDef ret = USBD_OK;
switch (req->bmRequest & USB_REQ_TYPE_MASK)
{
case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
break;
case USB_REQ_TYPE_STANDARD:
switch (req->bRequest)
{
case USB_REQ_GET_DESCRIPTOR:
USBD_GetDescriptor(pdev, req);
break;
case USB_REQ_SET_ADDRESS:
USBD_SetAddress(pdev, req);
break;
case USB_REQ_SET_CONFIGURATION:
ret = USBD_SetConfig(pdev, req);
break;
case USB_REQ_GET_CONFIGURATION:
USBD_GetConfig(pdev, req);
break;
case USB_REQ_GET_STATUS:
USBD_GetStatus(pdev, req);
break;
case USB_REQ_SET_FEATURE:
USBD_SetFeature(pdev, req);
break;
case USB_REQ_CLEAR_FEATURE:
USBD_ClrFeature(pdev, req);
break;
default:
USBD_CtlError(pdev, req);
break;
}
break;
default:
USBD_CtlError(pdev, req);
break;
}
return ret;
}
/**
* @brief USBD_StdItfReq
* Handle standard usb interface requests
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
USBD_StatusTypeDef ret = USBD_OK;
switch (req->bmRequest & USB_REQ_TYPE_MASK)
{
case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
case USB_REQ_TYPE_STANDARD:
switch (pdev->dev_state)
{
case USBD_STATE_DEFAULT:
case USBD_STATE_ADDRESSED:
case USBD_STATE_CONFIGURED:
if (LOBYTE(req->wIndex) <= USBD_MAX_NUM_INTERFACES)
{
ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
if ((req->wLength == 0U) && (ret == USBD_OK))
{
(void)USBD_CtlSendStatus(pdev);
}
}
else
{
USBD_CtlError(pdev, req);
}
break;
default:
USBD_CtlError(pdev, req);
break;
}
break;
default:
USBD_CtlError(pdev, req);
break;
}
return ret;
}
/**
* @brief USBD_StdEPReq
* Handle standard usb endpoint requests
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
USBD_EndpointTypeDef *pep;
uint8_t ep_addr;
USBD_StatusTypeDef ret = USBD_OK;
ep_addr = LOBYTE(req->wIndex);
switch (req->bmRequest & USB_REQ_TYPE_MASK)
{
case USB_REQ_TYPE_CLASS:
case USB_REQ_TYPE_VENDOR:
ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
break;
case USB_REQ_TYPE_STANDARD:
switch (req->bRequest)
{
case USB_REQ_SET_FEATURE:
switch (pdev->dev_state)
{
case USBD_STATE_ADDRESSED:
if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
{
(void)USBD_LL_StallEP(pdev, ep_addr);
(void)USBD_LL_StallEP(pdev, 0x80U);
}
else
{
USBD_CtlError(pdev, req);
}
break;
case USBD_STATE_CONFIGURED:
if (req->wValue == USB_FEATURE_EP_HALT)
{
if ((ep_addr != 0x00U) && (ep_addr != 0x80U) && (req->wLength == 0x00U))
{
(void)USBD_LL_StallEP(pdev, ep_addr);
}
}
(void)USBD_CtlSendStatus(pdev);
break;
default:
USBD_CtlError(pdev, req);
break;
}
break;
case USB_REQ_CLEAR_FEATURE:
switch (pdev->dev_state)
{
case USBD_STATE_ADDRESSED:
if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
{
(void)USBD_LL_StallEP(pdev, ep_addr);
(void)USBD_LL_StallEP(pdev, 0x80U);
}
else
{
USBD_CtlError(pdev, req);
}
break;
case USBD_STATE_CONFIGURED:
if (req->wValue == USB_FEATURE_EP_HALT)
{
if ((ep_addr & 0x7FU) != 0x00U)
{
(void)USBD_LL_ClearStallEP(pdev, ep_addr);
}
(void)USBD_CtlSendStatus(pdev);
ret = (USBD_StatusTypeDef)pdev->pClass->Setup(pdev, req);
}
break;
default:
USBD_CtlError(pdev, req);
break;
}
break;
case USB_REQ_GET_STATUS:
switch (pdev->dev_state)
{
case USBD_STATE_ADDRESSED:
if ((ep_addr != 0x00U) && (ep_addr != 0x80U))
{
USBD_CtlError(pdev, req);
break;
}
pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
&pdev->ep_out[ep_addr & 0x7FU];
pep->status = 0x0000U;
(void)USBD_CtlSendData(pdev, (uint8_t *)&pep->status, 2U);
break;
case USBD_STATE_CONFIGURED:
if ((ep_addr & 0x80U) == 0x80U)
{
if (pdev->ep_in[ep_addr & 0xFU].is_used == 0U)
{
USBD_CtlError(pdev, req);
break;
}
}
else
{
if (pdev->ep_out[ep_addr & 0xFU].is_used == 0U)
{
USBD_CtlError(pdev, req);
break;
}
}
pep = ((ep_addr & 0x80U) == 0x80U) ? &pdev->ep_in[ep_addr & 0x7FU] : \
&pdev->ep_out[ep_addr & 0x7FU];
if ((ep_addr == 0x00U) || (ep_addr == 0x80U))
{
pep->status = 0x0000U;
}
else if (USBD_LL_IsStallEP(pdev, ep_addr) != 0U)
{
pep->status = 0x0001U;
}
else
{
pep->status = 0x0000U;
}
(void)USBD_CtlSendData(pdev, (uint8_t *)&pep->status, 2U);
break;
default:
USBD_CtlError(pdev, req);
break;
}
break;
default:
USBD_CtlError(pdev, req);
break;
}
break;
default:
USBD_CtlError(pdev, req);
break;
}
return ret;
}
/**
* @brief USBD_GetDescriptor
* Handle Get Descriptor requests
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_GetDescriptor(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
uint16_t len = 0U;
uint8_t *pbuf = NULL;
uint8_t err = 0U;
switch (req->wValue >> 8)
{
#if ((USBD_LPM_ENABLED == 1U) || (USBD_CLASS_BOS_ENABLED == 1U))
case USB_DESC_TYPE_BOS:
if (pdev->pDesc->GetBOSDescriptor != NULL)
{
pbuf = pdev->pDesc->GetBOSDescriptor(pdev->dev_speed, &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
#endif
case USB_DESC_TYPE_DEVICE:
pbuf = pdev->pDesc->GetDeviceDescriptor(pdev->dev_speed, &len);
break;
case USB_DESC_TYPE_CONFIGURATION:
if (pdev->dev_speed == USBD_SPEED_HIGH)
{
pbuf = pdev->pClass->GetHSConfigDescriptor(&len);
pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
}
else
{
pbuf = pdev->pClass->GetFSConfigDescriptor(&len);
pbuf[1] = USB_DESC_TYPE_CONFIGURATION;
}
break;
case USB_DESC_TYPE_STRING:
switch ((uint8_t)(req->wValue))
{
case USBD_IDX_LANGID_STR:
if (pdev->pDesc->GetLangIDStrDescriptor != NULL)
{
pbuf = pdev->pDesc->GetLangIDStrDescriptor(pdev->dev_speed, &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
case USBD_IDX_MFC_STR:
if (pdev->pDesc->GetManufacturerStrDescriptor != NULL)
{
pbuf = pdev->pDesc->GetManufacturerStrDescriptor(pdev->dev_speed, &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
case USBD_IDX_PRODUCT_STR:
if (pdev->pDesc->GetProductStrDescriptor != NULL)
{
pbuf = pdev->pDesc->GetProductStrDescriptor(pdev->dev_speed, &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
case USBD_IDX_SERIAL_STR:
if (pdev->pDesc->GetSerialStrDescriptor != NULL)
{
pbuf = pdev->pDesc->GetSerialStrDescriptor(pdev->dev_speed, &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
case USBD_IDX_CONFIG_STR:
if (pdev->pDesc->GetConfigurationStrDescriptor != NULL)
{
pbuf = pdev->pDesc->GetConfigurationStrDescriptor(pdev->dev_speed, &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
case USBD_IDX_INTERFACE_STR:
if (pdev->pDesc->GetInterfaceStrDescriptor != NULL)
{
pbuf = pdev->pDesc->GetInterfaceStrDescriptor(pdev->dev_speed, &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
default:
#if (USBD_SUPPORT_USER_STRING_DESC == 1U)
if (pdev->pClass->GetUsrStrDescriptor != NULL)
{
pbuf = pdev->pClass->GetUsrStrDescriptor(pdev, (req->wValue), &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
#endif
#if (USBD_CLASS_USER_STRING_DESC == 1U)
if (pdev->pDesc->GetUserStrDescriptor != NULL)
{
pbuf = pdev->pDesc->GetUserStrDescriptor(pdev->dev_speed, (req->wValue), &len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
#endif
#if ((USBD_CLASS_USER_STRING_DESC == 0U) && (USBD_SUPPORT_USER_STRING_DESC == 0U))
USBD_CtlError(pdev, req);
err++;
#endif
break;
}
break;
case USB_DESC_TYPE_DEVICE_QUALIFIER:
if (pdev->dev_speed == USBD_SPEED_HIGH)
{
pbuf = pdev->pClass->GetDeviceQualifierDescriptor(&len);
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
case USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION:
if (pdev->dev_speed == USBD_SPEED_HIGH)
{
pbuf = pdev->pClass->GetOtherSpeedConfigDescriptor(&len);
pbuf[1] = USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION;
}
else
{
USBD_CtlError(pdev, req);
err++;
}
break;
default:
USBD_CtlError(pdev, req);
err++;
break;
}
if (err != 0U)
{
return;
}
if (req->wLength != 0U)
{
if (len != 0U)
{
len = MIN(len, req->wLength);
(void)USBD_CtlSendData(pdev, pbuf, len);
}
else
{
USBD_CtlError(pdev, req);
}
}
else
{
(void)USBD_CtlSendStatus(pdev);
}
}
/**
* @brief USBD_SetAddress
* Set device address
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_SetAddress(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
uint8_t dev_addr;
if ((req->wIndex == 0U) && (req->wLength == 0U) && (req->wValue < 128U))
{
dev_addr = (uint8_t)(req->wValue) & 0x7FU;
if (pdev->dev_state == USBD_STATE_CONFIGURED)
{
USBD_CtlError(pdev, req);
}
else
{
pdev->dev_address = dev_addr;
(void)USBD_LL_SetUSBAddress(pdev, dev_addr);
(void)USBD_CtlSendStatus(pdev);
if (dev_addr != 0U)
{
pdev->dev_state = USBD_STATE_ADDRESSED;
}
else
{
pdev->dev_state = USBD_STATE_DEFAULT;
}
}
}
else
{
USBD_CtlError(pdev, req);
}
}
/**
* @brief USBD_SetConfig
* Handle Set device configuration request
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static USBD_StatusTypeDef USBD_SetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
USBD_StatusTypeDef ret = USBD_OK;
static uint8_t cfgidx;
cfgidx = (uint8_t)(req->wValue);
if (cfgidx > USBD_MAX_NUM_CONFIGURATION)
{
USBD_CtlError(pdev, req);
return USBD_FAIL;
}
switch (pdev->dev_state)
{
case USBD_STATE_ADDRESSED:
if (cfgidx != 0U)
{
pdev->dev_config = cfgidx;
ret = USBD_SetClassConfig(pdev, cfgidx);
if (ret != USBD_OK)
{
USBD_CtlError(pdev, req);
}
else
{
(void)USBD_CtlSendStatus(pdev);
pdev->dev_state = USBD_STATE_CONFIGURED;
}
}
else
{
(void)USBD_CtlSendStatus(pdev);
}
break;
case USBD_STATE_CONFIGURED:
if (cfgidx == 0U)
{
pdev->dev_state = USBD_STATE_ADDRESSED;
pdev->dev_config = cfgidx;
(void)USBD_ClrClassConfig(pdev, cfgidx);
(void)USBD_CtlSendStatus(pdev);
}
else if (cfgidx != pdev->dev_config)
{
/* Clear old configuration */
(void)USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config);
/* set new configuration */
pdev->dev_config = cfgidx;
ret = USBD_SetClassConfig(pdev, cfgidx);
if (ret != USBD_OK)
{
USBD_CtlError(pdev, req);
(void)USBD_ClrClassConfig(pdev, (uint8_t)pdev->dev_config);
pdev->dev_state = USBD_STATE_ADDRESSED;
}
else
{
(void)USBD_CtlSendStatus(pdev);
}
}
else
{
(void)USBD_CtlSendStatus(pdev);
}
break;
default:
USBD_CtlError(pdev, req);
(void)USBD_ClrClassConfig(pdev, cfgidx);
ret = USBD_FAIL;
break;
}
return ret;
}
/**
* @brief USBD_GetConfig
* Handle Get device configuration request
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_GetConfig(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
if (req->wLength != 1U)
{
USBD_CtlError(pdev, req);
}
else
{
switch (pdev->dev_state)
{
case USBD_STATE_DEFAULT:
case USBD_STATE_ADDRESSED:
pdev->dev_default_config = 0U;
(void)USBD_CtlSendData(pdev, (uint8_t *)&pdev->dev_default_config, 1U);
break;
case USBD_STATE_CONFIGURED:
(void)USBD_CtlSendData(pdev, (uint8_t *)&pdev->dev_config, 1U);
break;
default:
USBD_CtlError(pdev, req);
break;
}
}
}
/**
* @brief USBD_GetStatus
* Handle Get Status request
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_GetStatus(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
switch (pdev->dev_state)
{
case USBD_STATE_DEFAULT:
case USBD_STATE_ADDRESSED:
case USBD_STATE_CONFIGURED:
if (req->wLength != 0x2U)
{
USBD_CtlError(pdev, req);
break;
}
#if (USBD_SELF_POWERED == 1U)
pdev->dev_config_status = USB_CONFIG_SELF_POWERED;
#else
pdev->dev_config_status = 0U;
#endif
if (pdev->dev_remote_wakeup != 0U)
{
pdev->dev_config_status |= USB_CONFIG_REMOTE_WAKEUP;
}
(void)USBD_CtlSendData(pdev, (uint8_t *)&pdev->dev_config_status, 2U);
break;
default:
USBD_CtlError(pdev, req);
break;
}
}
/**
* @brief USBD_SetFeature
* Handle Set device feature request
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_SetFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
if (req->wValue == USB_FEATURE_REMOTE_WAKEUP)
{
pdev->dev_remote_wakeup = 1U;
(void)USBD_CtlSendStatus(pdev);
}
}
/**
* @brief USBD_ClrFeature
* Handle clear device feature request
* @param pdev: device instance
* @param req: usb request
* @retval status
*/
static void USBD_ClrFeature(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
switch (pdev->dev_state)
{
case USBD_STATE_DEFAULT:
case USBD_STATE_ADDRESSED:
case USBD_STATE_CONFIGURED:
if (req->wValue == USB_FEATURE_REMOTE_WAKEUP)
{
pdev->dev_remote_wakeup = 0U;
(void)USBD_CtlSendStatus(pdev);
}
break;
default:
USBD_CtlError(pdev, req);
break;
}
}
/**
* @brief USBD_ParseSetupRequest
* Copy buffer into setup structure
* @param pdev: device instance
* @param req: usb request
* @retval None
*/
void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata)
{
uint8_t *pbuff = pdata;
req->bmRequest = *(uint8_t *)(pbuff);
pbuff++;
req->bRequest = *(uint8_t *)(pbuff);
pbuff++;
req->wValue = SWAPBYTE(pbuff);
pbuff++;
pbuff++;
req->wIndex = SWAPBYTE(pbuff);
pbuff++;
pbuff++;
req->wLength = SWAPBYTE(pbuff);
}
/**
* @brief USBD_CtlError
* Handle USB low level Error
* @param pdev: device instance
* @param req: usb request
* @retval None
*/
void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
{
UNUSED(req);
(void)USBD_LL_StallEP(pdev, 0x80U);
(void)USBD_LL_StallEP(pdev, 0U);
}
/**
* @brief USBD_GetString
* Convert Ascii string into unicode one
* @param desc : descriptor buffer
* @param unicode : Formatted string buffer (unicode)
* @param len : descriptor length
* @retval None
*/
void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len)
{
uint8_t idx = 0U;
uint8_t *pdesc;
if (desc == NULL)
{
return;
}
pdesc = desc;
*len = ((uint16_t)USBD_GetLen(pdesc) * 2U) + 2U;
unicode[idx] = *(uint8_t *)len;
idx++;
unicode[idx] = USB_DESC_TYPE_STRING;
idx++;
while (*pdesc != (uint8_t)'\0')
{
unicode[idx] = *pdesc;
pdesc++;
idx++;
unicode[idx] = 0U;
idx++;
}
}
/**
* @brief USBD_GetLen
* return the string length
* @param buf : pointer to the ascii string buffer
* @retval string length
*/
static uint8_t USBD_GetLen(uint8_t *buf)
{
uint8_t len = 0U;
uint8_t *pbuff = buf;
while (*pbuff != (uint8_t)'\0')
{
len++;
pbuff++;
}
return len;
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,451 @@
/**
******************************************************************************
* @file usbd_desc_template.c
* @author MCD Application Team
* @brief This file provides the USBD descriptors and string formatting method.
* This template should be copied to the user folder,
* renamed and customized following user needs.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "usbd_core.h"
#include "usbd_desc.h"
#include "usbd_conf.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
#define USBD_VID 0x0483
#define USBD_PID 0xaaaa /* Replace '0xaaaa' with your device product ID */
#define USBD_LANGID_STRING 0xbbb /* Replace '0xbbb' with your device language ID */
#define USBD_MANUFACTURER_STRING "xxxxx" /* Add your manufacturer string */
#define USBD_PRODUCT_HS_STRING "xxxxx" /* Add your product High Speed string */
#define USBD_PRODUCT_FS_STRING "xxxxx" /* Add your product Full Speed string */
#define USBD_CONFIGURATION_HS_STRING "xxxxx" /* Add your configuration High Speed string */
#define USBD_INTERFACE_HS_STRING "xxxxx" /* Add your Interface High Speed string */
#define USBD_CONFIGURATION_FS_STRING "xxxxx" /* Add your configuration Full Speed string */
#define USBD_INTERFACE_FS_STRING "xxxxx" /* Add your Interface Full Speed string */
/* Private macro -------------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
uint8_t *USBD_Class_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_Class_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_Class_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_Class_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_Class_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_Class_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t *USBD_Class_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
#if (USBD_CLASS_USER_STRING_DESC == 1)
uint8_t *USBD_Class_UserStrDescriptor(USBD_SpeedTypeDef speed, uint8_t idx, uint16_t *length);
#endif /* USB_CLASS_USER_STRING_DESC */
#if ((USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1))
uint8_t *USBD_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
#endif
/* Private variables ---------------------------------------------------------*/
USBD_DescriptorsTypeDef Class_Desc =
{
USBD_Class_DeviceDescriptor,
USBD_Class_LangIDStrDescriptor,
USBD_Class_ManufacturerStrDescriptor,
USBD_Class_ProductStrDescriptor,
USBD_Class_SerialStrDescriptor,
USBD_Class_ConfigStrDescriptor,
USBD_Class_InterfaceStrDescriptor,
#if (USBD_CLASS_USER_STRING_DESC == 1)
USBD_CLASS_UserStrDescriptor,
#endif
#if ((USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1))
USBD_USR_BOSDescriptor,
#endif
};
/* USB Standard Device Descriptor */
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
#endif
__ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
{
0x12, /* bLength */
USB_DESC_TYPE_DEVICE, /* bDescriptorType */
#if ((USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1))
0x01, /*bcdUSB */ /* changed to USB version 2.01
in order to support BOS Desc */
#else
0x00, /* bcdUSB */
#endif
0x02,
0x00, /* bDeviceClass */
0x00, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */
USB_MAX_EP0_SIZE, /* bMaxPacketSize */
LOBYTE(USBD_VID), /* idVendor */
HIBYTE(USBD_VID), /* idVendor */
LOBYTE(USBD_PID), /* idVendor */
HIBYTE(USBD_PID), /* idVendor */
0x00, /* bcdDevice rel. 2.00 */
0x02,
USBD_IDX_MFC_STR, /* Index of manufacturer string */
USBD_IDX_PRODUCT_STR, /* Index of product string */
USBD_IDX_SERIAL_STR, /* Index of serial number string */
USBD_MAX_NUM_CONFIGURATION /* bNumConfigurations */
}; /* USB_DeviceDescriptor */
/* USB Device LPM BOS descriptor */
#if (USBD_LPM_ENABLED == 1)
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
#endif
__ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
{
0x5,
USB_DESC_TYPE_BOS,
0xC,
0x0,
0x1, /* 1 device capability */
/* device capability */
0x7,
USB_DEVICE_CAPABITY_TYPE,
0x2,
0x6, /*LPM capability bit set */
0x0,
0x0,
0x0
};
#endif
/* USB Device Billboard BOS descriptor Template */
#if (USBD_CLASS_BOS_ENABLED == 1)
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
#endif
__ALIGN_BEGIN uint8_t USBD_BOSDesc[USB_SIZ_BOS_DESC] __ALIGN_END =
{
0x05, /* bLength */
USB_DESC_TYPE_BOS, /* Device Descriptor Type */
USB_SIZ_BOS_DESC, /* Total length of BOS descriptor and all of its sub descs */
0x00,
0x04, /* The number of separate device capability descriptors in the BOS */
/* ----------- Device Capability Descriptor: CONTAINER_ID ---------- */
0x14, /* bLength */
0x10, /* bDescriptorType: DEVICE CAPABILITY Type */
0x04, /* bDevCapabilityType: CONTAINER_ID */
0x00, /* bReserved */
0xa7, 0xd6, 0x1b, 0xfa, /* ContainerID: This is a Unique 128-bit number GUID */
0x91, 0xa6, 0xa8, 0x4e,
0xa8, 0x21, 0x9f, 0x2b,
0xaf, 0xf7, 0x94, 0xd4,
/* ----------- Device Capability Descriptor: BillBoard ---------- */
0x34, /* bLength */
0x10, /* bDescriptorType: DEVICE CAPABILITY Type */
0x0D, /* bDevCapabilityType: BILLBOARD_CAPABILITY */
USBD_BB_URL_STRING_INDEX, /* iAddtionalInfoURL: Index of string descriptor providing a URL where the user can go to get more
detailed information about the product and the various Alternate Modes it supports */
0x02, /* bNumberOfAlternateModes: Number of Alternate modes supported. The
maximum value that this field can be set to is MAX_NUM_ALT_MODE. */
0x00, /* bPreferredAlternateMode: Index of the preferred Alternate Mode. System
software may use this information to provide the user with a better user experience. */
0x00, 0x00, /* VCONN Power needed by the adapter for full functionality 000b = 1W */
0x01, 0x00, 0x00, 0x00, /* bmConfigured. 01b: Alternate Mode configuration not attempted or exited */
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x21, 0x01, /* bcdVersion = 0x0121 */
0x00, /* bAdditionalFailureInfo */
0x00, /* bReserved */
LOBYTE(USBD_VID),
HIBYTE(USBD_VID), /* wSVID[0]: Standard or Vendor ID. This shall match one of the SVIDs
returned in response to a USB PD Discover SVIDs command */
0x00, /* bAlternateMode[0] Index of the Alternate Mode within the SVID as
returned in response to a Discover Modes command. Example:
0 – first Mode entry
1 – second mode entry */
USBD_BB_ALTMODE0_STRING_INDEX, /* iAlternateModeString[0]: Index of string descriptor describing protocol.
It is optional to support this string. */
LOBYTE(USBD_VID),
HIBYTE(USBD_VID), /* wSVID[1]: Standard or Vendor ID. This shall match one of the SVIDs
returned in response to a USB PD Discover SVIDs command */
0x01, /* bAlternateMode[1] Index of the Alternate Mode within the SVID as
returned in response to a Discover Modes command. Example:
0 – first Mode entry
1 – second Mode entry */
USBD_BB_ALTMODE1_STRING_INDEX, /* iAlternateModeString[1]: Index of string descriptor describing protocol.
It is optional to support this string. */
/* Alternate Mode Desc */
/* ----------- Device Capability Descriptor: BillBoard Alternate Mode Desc ---------- */
0x08, /* bLength */
0x10, /* bDescriptorType: Device Descriptor Type */
0x0F, /* bDevCapabilityType: BILLBOARD ALTERNATE MODE CAPABILITY */
0x00, /* bIndex: Index of Alternate Mode described in the Billboard Capability Desc */
0x10, 0x00, 0x00, 0x00, /* dwAlternateModeVdo: contents of the Mode VDO for the alternate mode identified by bIndex */
0x08, /* bLength */
0x10, /* bDescriptorType: Device Descriptor Type */
0x0F, /* bDevCapabilityType: BILLBOARD ALTERNATE MODE CAPABILITY */
0x01, /* bIndex: Index of Alternate Mode described in the Billboard Capability Desc */
0x20, 0x00, 0x00, 0x00, /* dwAlternateModeVdo: contents of the Mode VDO for the alternate mode identified by bIndex */
};
#endif
/* USB Standard Device Descriptor */
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
#endif
__ALIGN_BEGIN uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_END =
{
USB_LEN_LANGID_STR_DESC,
USB_DESC_TYPE_STRING,
LOBYTE(USBD_LANGID_STRING),
HIBYTE(USBD_LANGID_STRING),
};
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
#endif
__ALIGN_BEGIN uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL] =
{
USB_SIZ_STRING_SERIAL,
USB_DESC_TYPE_STRING,
};
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
#endif
__ALIGN_BEGIN uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
/* Private functions ---------------------------------------------------------*/
static void IntToUnicode(uint32_t value, uint8_t *pbuf, uint8_t len);
static void Get_SerialNum(void);
/**
* @brief Returns the device descriptor.
* @param speed: Current device speed
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
*length = sizeof(USBD_DeviceDesc);
return (uint8_t *)USBD_DeviceDesc;
}
/**
* @brief Returns the LangID string descriptor.
* @param speed: Current device speed
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
*length = sizeof(USBD_LangIDDesc);
return (uint8_t *)USBD_LangIDDesc;
}
/**
* @brief Returns the product string descriptor.
* @param speed: Current device speed
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
if (speed == USBD_SPEED_HIGH)
{
USBD_GetString((uint8_t *)USBD_PRODUCT_HS_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString((uint8_t *)USBD_PRODUCT_FS_STRING, USBD_StrDesc, length);
}
return USBD_StrDesc;
}
/**
* @brief Returns the manufacturer string descriptor.
* @param speed: Current device speed
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
return USBD_StrDesc;
}
/**
* @brief Returns the serial number string descriptor.
* @param speed: Current device speed
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
*length = USB_SIZ_STRING_SERIAL;
/* Update the serial number string descriptor with the data from the unique ID*/
Get_SerialNum();
return (uint8_t *)USBD_StringSerial;
}
/**
* @brief Returns the configuration string descriptor.
* @param speed: Current device speed
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
if (speed == USBD_SPEED_HIGH)
{
USBD_GetString((uint8_t *)USBD_CONFIGURATION_HS_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString((uint8_t *)USBD_CONFIGURATION_FS_STRING, USBD_StrDesc, length);
}
return USBD_StrDesc;
}
/**
* @brief Returns the interface string descriptor.
* @param speed: Current device speed
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
if (speed == USBD_SPEED_HIGH)
{
USBD_GetString((uint8_t *)USBD_INTERFACE_HS_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString((uint8_t *)USBD_INTERFACE_FS_STRING, USBD_StrDesc, length);
}
return USBD_StrDesc;
}
/**
* @brief Create the serial number string descriptor
* @param None
* @retval None
*/
static void Get_SerialNum(void)
{
uint32_t deviceserial0, deviceserial1, deviceserial2;
deviceserial0 = *(uint32_t *)DEVICE_ID1;
deviceserial1 = *(uint32_t *)DEVICE_ID2;
deviceserial2 = *(uint32_t *)DEVICE_ID3;
deviceserial0 += deviceserial2;
if (deviceserial0 != 0U)
{
IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8U);
IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4U);
}
}
#if ((USBD_LPM_ENABLED == 1) || (USBD_CLASS_BOS_ENABLED == 1))
/**
* @brief USBD_USR_BOSDescriptor
* return the BOS descriptor
* @param speed : current device speed
* @param length : pointer to data length variable
* @retval pointer to descriptor buffer
*/
uint8_t *USBD_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
*length = sizeof(USBD_BOSDesc);
return (uint8_t *)USBD_BOSDesc;
}
#endif
#if (USBD_CLASS_USER_STRING_DESC == 1)
/**
* @brief Returns the Class User string descriptor.
* @param speed: Current device speed
* @param idx: index of string descriptor
* @param length: Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t *USBD_Class_UserStrDescriptor(USBD_SpeedTypeDef speed, uint8_t idx, uint16_t *length)
{
static uint8_t USBD_StrDesc[255];
return USBD_StrDesc;
}
#endif
/**
* @brief Convert Hex 32Bits value into char
* @param value: value to convert
* @param pbuf: pointer to the buffer
* @param len: buffer length
* @retval None
*/
static void IntToUnicode(uint32_t value, uint8_t *pbuf, uint8_t len)
{
uint8_t idx = 0U;
for (idx = 0U ; idx < len ; idx ++)
{
if (((value >> 28)) < 0xAU)
{
pbuf[ 2U * idx] = (value >> 28) + '0';
}
else
{
pbuf[2U * idx] = (value >> 28) + 'A' - 10U;
}
value = value << 4;
pbuf[2U * idx + 1] = 0U;
}
}
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,226 @@
/**
******************************************************************************
* @file usbd_ioreq.c
* @author MCD Application Team
* @brief This file provides the IO requests APIs for control endpoints.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "usbd_ioreq.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_IOREQ
* @brief control I/O requests module
* @{
*/
/** @defgroup USBD_IOREQ_Private_TypesDefinitions
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Private_Defines
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Private_Macros
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Private_Variables
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Private_FunctionPrototypes
* @{
*/
/**
* @}
*/
/** @defgroup USBD_IOREQ_Private_Functions
* @{
*/
/**
* @brief USBD_CtlSendData
* send data on the ctl pipe
* @param pdev: device instance
* @param buff: pointer to data buffer
* @param len: length of data to be sent
* @retval status
*/
USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len)
{
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_DATA_IN;
pdev->ep_in[0].total_length = len;
#ifdef USBD_AVOID_PACKET_SPLIT_MPS
pdev->ep_in[0].rem_length = 0U;
#else
pdev->ep_in[0].rem_length = len;
#endif
/* Start the transfer */
(void)USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
return USBD_OK;
}
/**
* @brief USBD_CtlContinueSendData
* continue sending data on the ctl pipe
* @param pdev: device instance
* @param buff: pointer to data buffer
* @param len: length of data to be sent
* @retval status
*/
USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len)
{
/* Start the next transfer */
(void)USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
return USBD_OK;
}
/**
* @brief USBD_CtlPrepareRx
* receive data on the ctl pipe
* @param pdev: device instance
* @param buff: pointer to data buffer
* @param len: length of data to be received
* @retval status
*/
USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len)
{
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_DATA_OUT;
pdev->ep_out[0].total_length = len;
#ifdef USBD_AVOID_PACKET_SPLIT_MPS
pdev->ep_out[0].rem_length = 0U;
#else
pdev->ep_out[0].rem_length = len;
#endif
/* Start the transfer */
(void)USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
return USBD_OK;
}
/**
* @brief USBD_CtlContinueRx
* continue receive data on the ctl pipe
* @param pdev: device instance
* @param buff: pointer to data buffer
* @param len: length of data to be received
* @retval status
*/
USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev,
uint8_t *pbuf, uint32_t len)
{
(void)USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
return USBD_OK;
}
/**
* @brief USBD_CtlSendStatus
* send zero lzngth packet on the ctl pipe
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev)
{
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_STATUS_IN;
/* Start the transfer */
(void)USBD_LL_Transmit(pdev, 0x00U, NULL, 0U);
return USBD_OK;
}
/**
* @brief USBD_CtlReceiveStatus
* receive zero lzngth packet on the ctl pipe
* @param pdev: device instance
* @retval status
*/
USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev)
{
/* Set EP0 State */
pdev->ep0_state = USBD_EP0_STATUS_OUT;
/* Start the transfer */
(void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
return USBD_OK;
}
/**
* @brief USBD_GetRxCount
* returns the received data length
* @param pdev: device instance
* @param ep_addr: endpoint address
* @retval Rx Data blength
*/
uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
return USBD_LL_GetRxDataSize(pdev, ep_addr);
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

View File

@@ -0,0 +1,97 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : usb_device.c
* @version : v3.0_Cube
* @brief : This file implements the USB Device
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "usb_device.h"
#include "usbd_core.h"
#include "usbd_desc.h"
#include "usbd_cdc.h"
#include "usbd_cdc_if.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/
/* USER CODE END PV */
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE END PFP */
extern void Error_Handler(void);
/* USB Device Core handle declaration. */
USBD_HandleTypeDef hUsbDeviceFS;
extern USBD_DescriptorsTypeDef CDC_Desc;
/*
* -- Insert your variables declaration here --
*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/*
* -- Insert your external function declaration here --
*/
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/**
* Init USB device Library, add supported class and start the library
* @retval None
*/
void MX_USB_Device_Init(void)
{
/* USER CODE BEGIN USB_Device_Init_PreTreatment */
/* USER CODE END USB_Device_Init_PreTreatment */
/* Init Device Library, add supported class and start the library. */
if (USBD_Init(&hUsbDeviceFS, &CDC_Desc, DEVICE_FS) != USBD_OK) {
Error_Handler();
}
if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC) != USBD_OK) {
Error_Handler();
}
if (USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS) != USBD_OK) {
Error_Handler();
}
if (USBD_Start(&hUsbDeviceFS) != USBD_OK) {
Error_Handler();
}
/* USER CODE BEGIN USB_Device_Init_PostTreatment */
/* USER CODE END USB_Device_Init_PostTreatment */
}
/**
* @}
*/
/**
* @}
*/

View File

@@ -0,0 +1,103 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : usb_device.h
* @version : v3.0_Cube
* @brief : Header for usb_device.c file.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USB_DEVICE__H__
#define __USB_DEVICE__H__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32g4xx.h"
#include "stm32g4xx_hal.h"
#include "usbd_def.h"
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/** @addtogroup USBD_OTG_DRIVER
* @{
*/
/** @defgroup USBD_DEVICE USBD_DEVICE
* @brief Device file for Usb otg low level driver.
* @{
*/
/** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables
* @brief Public variables.
* @{
*/
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/*
* -- Insert your variables declaration here --
*/
/* USER CODE BEGIN VARIABLES */
/* USER CODE END VARIABLES */
/**
* @}
*/
/** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype
* @brief Declaration of public functions for Usb device.
* @{
*/
/** USB Device initialization function. */
void MX_USB_Device_Init(void);
/*
* -- Insert functions declaration here --
*/
/* USER CODE BEGIN FD */
/* USER CODE END FD */
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USB_DEVICE__H__ */

View File

@@ -0,0 +1,328 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : usbd_cdc_if.c
* @version : v3.0_Cube
* @brief : Usb device for Virtual Com Port.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "usbd_cdc_if.h"
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/
/* USER CODE END PV */
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
* @brief Usb device library.
* @{
*/
/** @addtogroup USBD_CDC_IF
* @{
*/
/** @defgroup USBD_CDC_IF_Private_TypesDefinitions USBD_CDC_IF_Private_TypesDefinitions
* @brief Private types.
* @{
*/
/* USER CODE BEGIN PRIVATE_TYPES */
/* USER CODE END PRIVATE_TYPES */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Private_Defines USBD_CDC_IF_Private_Defines
* @brief Private defines.
* @{
*/
/* USER CODE BEGIN PRIVATE_DEFINES */
/* USER CODE END PRIVATE_DEFINES */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Private_Macros USBD_CDC_IF_Private_Macros
* @brief Private macros.
* @{
*/
/* USER CODE BEGIN PRIVATE_MACRO */
/* USER CODE END PRIVATE_MACRO */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Private_Variables USBD_CDC_IF_Private_Variables
* @brief Private variables.
* @{
*/
/* Create buffer for reception and transmission */
/* It's up to user to redefine and/or remove those define */
/** Received data over USB are stored in this buffer */
uint8_t UserRxBufferFS[APP_RX_DATA_SIZE];
/** Data to send over USB CDC are stored in this buffer */
uint8_t UserTxBufferFS[APP_TX_DATA_SIZE];
/* USER CODE BEGIN PRIVATE_VARIABLES */
/* USER CODE END PRIVATE_VARIABLES */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables
* @brief Public variables.
* @{
*/
extern USBD_HandleTypeDef hUsbDeviceFS;
/* USER CODE BEGIN EXPORTED_VARIABLES */
/* USER CODE END EXPORTED_VARIABLES */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Private_FunctionPrototypes USBD_CDC_IF_Private_FunctionPrototypes
* @brief Private functions declaration.
* @{
*/
static int8_t CDC_Init_FS(void);
static int8_t CDC_DeInit_FS(void);
static int8_t CDC_Control_FS(uint8_t cmd, uint8_t* pbuf, uint16_t length);
static int8_t CDC_Receive_FS(uint8_t* pbuf, uint32_t *Len);
static int8_t CDC_TransmitCplt_FS(uint8_t *pbuf, uint32_t *Len, uint8_t epnum);
/* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */
/* USER CODE END PRIVATE_FUNCTIONS_DECLARATION */
/**
* @}
*/
USBD_CDC_ItfTypeDef USBD_Interface_fops_FS =
{
CDC_Init_FS,
CDC_DeInit_FS,
CDC_Control_FS,
CDC_Receive_FS,
CDC_TransmitCplt_FS
};
/* Private functions ---------------------------------------------------------*/
/**
* @brief Initializes the CDC media low layer over the FS USB IP
* @retval USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t CDC_Init_FS(void)
{
/* USER CODE BEGIN 3 */
/* Set Application Buffers */
USBD_CDC_SetTxBuffer(&hUsbDeviceFS, UserTxBufferFS, 0);
USBD_CDC_SetRxBuffer(&hUsbDeviceFS, UserRxBufferFS);
return (USBD_OK);
/* USER CODE END 3 */
}
/**
* @brief DeInitializes the CDC media low layer
* @retval USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t CDC_DeInit_FS(void)
{
/* USER CODE BEGIN 4 */
return (USBD_OK);
/* USER CODE END 4 */
}
/**
* @brief Manage the CDC class requests
* @param cmd: Command code
* @param pbuf: Buffer containing command data (request parameters)
* @param length: Number of data to be sent (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t CDC_Control_FS(uint8_t cmd, uint8_t* pbuf, uint16_t length)
{
/* USER CODE BEGIN 5 */
switch(cmd)
{
case CDC_SEND_ENCAPSULATED_COMMAND:
break;
case CDC_GET_ENCAPSULATED_RESPONSE:
break;
case CDC_SET_COMM_FEATURE:
break;
case CDC_GET_COMM_FEATURE:
break;
case CDC_CLEAR_COMM_FEATURE:
break;
/*******************************************************************************/
/* Line Coding Structure */
/*-----------------------------------------------------------------------------*/
/* Offset | Field | Size | Value | Description */
/* 0 | dwDTERate | 4 | Number |Data terminal rate, in bits per second*/
/* 4 | bCharFormat | 1 | Number | Stop bits */
/* 0 - 1 Stop bit */
/* 1 - 1.5 Stop bits */
/* 2 - 2 Stop bits */
/* 5 | bParityType | 1 | Number | Parity */
/* 0 - None */
/* 1 - Odd */
/* 2 - Even */
/* 3 - Mark */
/* 4 - Space */
/* 6 | bDataBits | 1 | Number Data bits (5, 6, 7, 8 or 16). */
/*******************************************************************************/
case CDC_SET_LINE_CODING:
break;
case CDC_GET_LINE_CODING:
break;
case CDC_SET_CONTROL_LINE_STATE:
break;
case CDC_SEND_BREAK:
break;
default:
break;
}
return (USBD_OK);
/* USER CODE END 5 */
}
/**
* @brief Data received over USB OUT endpoint are sent over CDC interface
* through this function.
*
* @note
* This function will issue a NAK packet on any OUT packet received on
* USB endpoint until exiting this function. If you exit this function
* before transfer is complete on CDC interface (ie. using DMA controller)
* it will result in receiving more data while previous ones are still
* not sent.
*
* @param Buf: Buffer of data to be received
* @param Len: Number of data received (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len)
{
/* USER CODE BEGIN 6 */
USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]);
USBD_CDC_ReceivePacket(&hUsbDeviceFS);
return (USBD_OK);
/* USER CODE END 6 */
}
/**
* @brief CDC_Transmit_FS
* Data to send over USB IN endpoint are sent over CDC interface
* through this function.
* @note
*
*
* @param Buf: Buffer of data to be sent
* @param Len: Number of data to be sent (in bytes)
* @retval USBD_OK if all operations are OK else USBD_FAIL or USBD_BUSY
*/
uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)
{
uint8_t result = USBD_OK;
/* USER CODE BEGIN 7 */
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)hUsbDeviceFS.pClassData;
if (hcdc->TxState != 0){
return USBD_BUSY;
}
USBD_CDC_SetTxBuffer(&hUsbDeviceFS, Buf, Len);
result = USBD_CDC_TransmitPacket(&hUsbDeviceFS);
/* USER CODE END 7 */
return result;
}
/**
* @brief CDC_TransmitCplt_FS
* Data transmitted callback
*
* @note
* This function is IN transfer complete callback used to inform user that
* the submitted Data is successfully sent over USB.
*
* @param Buf: Buffer of data to be received
* @param Len: Number of data received (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t CDC_TransmitCplt_FS(uint8_t *Buf, uint32_t *Len, uint8_t epnum)
{
uint8_t result = USBD_OK;
/* USER CODE BEGIN 13 */
UNUSED(Buf);
UNUSED(Len);
UNUSED(epnum);
/* USER CODE END 13 */
return result;
}
/* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */
/* USER CODE END PRIVATE_FUNCTIONS_IMPLEMENTATION */
/**
* @}
*/
/**
* @}
*/

View File

@@ -0,0 +1,131 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : usbd_cdc_if.h
* @version : v3.0_Cube
* @brief : Header for usbd_cdc_if.c file.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_CDC_IF_H__
#define __USBD_CDC_IF_H__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_cdc.h"
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
* @brief For Usb device.
* @{
*/
/** @defgroup USBD_CDC_IF USBD_CDC_IF
* @brief Usb VCP device module
* @{
*/
/** @defgroup USBD_CDC_IF_Exported_Defines USBD_CDC_IF_Exported_Defines
* @brief Defines.
* @{
*/
/* Define size for the receive and transmit buffer over CDC */
#define APP_RX_DATA_SIZE 1000
#define APP_TX_DATA_SIZE 1000
/* USER CODE BEGIN EXPORTED_DEFINES */
/* USER CODE END EXPORTED_DEFINES */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Exported_Types USBD_CDC_IF_Exported_Types
* @brief Types.
* @{
*/
/* USER CODE BEGIN EXPORTED_TYPES */
/* USER CODE END EXPORTED_TYPES */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Exported_Macros USBD_CDC_IF_Exported_Macros
* @brief Aliases.
* @{
*/
/* USER CODE BEGIN EXPORTED_MACRO */
/* USER CODE END EXPORTED_MACRO */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Exported_Variables USBD_CDC_IF_Exported_Variables
* @brief Public variables.
* @{
*/
/** CDC Interface callback. */
extern USBD_CDC_ItfTypeDef USBD_Interface_fops_FS;
/* USER CODE BEGIN EXPORTED_VARIABLES */
/* USER CODE END EXPORTED_VARIABLES */
/**
* @}
*/
/** @defgroup USBD_CDC_IF_Exported_FunctionsPrototype USBD_CDC_IF_Exported_FunctionsPrototype
* @brief Public functions declaration.
* @{
*/
uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len);
/* USER CODE BEGIN EXPORTED_FUNCTIONS */
/* USER CODE END EXPORTED_FUNCTIONS */
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USBD_CDC_IF_H__ */

View File

@@ -0,0 +1,394 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : App/usbd_desc.c
* @version : v3.0_Cube
* @brief : This file implements the USB device descriptors.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "usbd_core.h"
#include "usbd_desc.h"
#include "usbd_conf.h"
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* Private variables ---------------------------------------------------------*/
/* USER CODE END PV */
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
* @{
*/
/** @addtogroup USBD_DESC
* @{
*/
/** @defgroup USBD_DESC_Private_TypesDefinitions USBD_DESC_Private_TypesDefinitions
* @brief Private types.
* @{
*/
/* USER CODE BEGIN PRIVATE_TYPES */
/* USER CODE END PRIVATE_TYPES */
/**
* @}
*/
/** @defgroup USBD_DESC_Private_Defines USBD_DESC_Private_Defines
* @brief Private defines.
* @{
*/
#define USBD_VID 1155
#define USBD_LANGID_STRING 1033
#define USBD_MANUFACTURER_STRING "STMicroelectronics"
#define USBD_PID 22336
#define USBD_PRODUCT_STRING "STM32 Virtual ComPort"
#define USBD_CONFIGURATION_STRING "CDC Config"
#define USBD_INTERFACE_STRING "CDC Interface"
/* USER CODE BEGIN PRIVATE_DEFINES */
/* USER CODE END PRIVATE_DEFINES */
/**
* @}
*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/** @defgroup USBD_DESC_Private_Macros USBD_DESC_Private_Macros
* @brief Private macros.
* @{
*/
/* USER CODE BEGIN PRIVATE_MACRO */
/* USER CODE END PRIVATE_MACRO */
/**
* @}
*/
/** @defgroup USBD_DESC_Private_FunctionPrototypes USBD_DESC_Private_FunctionPrototypes
* @brief Private functions declaration.
* @{
*/
static void Get_SerialNum(void);
static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len);
/**
* @}
*/
/** @defgroup USBD_DESC_Private_FunctionPrototypes USBD_DESC_Private_FunctionPrototypes
* @brief Private functions declaration.
* @{
*/
uint8_t * USBD_CDC_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t * USBD_CDC_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t * USBD_CDC_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t * USBD_CDC_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t * USBD_CDC_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t * USBD_CDC_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
uint8_t * USBD_CDC_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
/**
* @}
*/
/** @defgroup USBD_DESC_Private_Variables USBD_DESC_Private_Variables
* @brief Private variables.
* @{
*/
USBD_DescriptorsTypeDef CDC_Desc =
{
USBD_CDC_DeviceDescriptor,
USBD_CDC_LangIDStrDescriptor,
USBD_CDC_ManufacturerStrDescriptor,
USBD_CDC_ProductStrDescriptor,
USBD_CDC_SerialStrDescriptor,
USBD_CDC_ConfigStrDescriptor,
USBD_CDC_InterfaceStrDescriptor
};
#if defined ( __ICCARM__ ) /* IAR Compiler */
#pragma data_alignment=4
#endif /* defined ( __ICCARM__ ) */
/** USB standard device descriptor. */
__ALIGN_BEGIN uint8_t USBD_CDC_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
{
0x12, /*bLength */
USB_DESC_TYPE_DEVICE, /*bDescriptorType*/
0x00, /*bcdUSB */
0x02,
0x02, /*bDeviceClass*/
0x02, /*bDeviceSubClass*/
0x00, /*bDeviceProtocol*/
USB_MAX_EP0_SIZE, /*bMaxPacketSize*/
LOBYTE(USBD_VID), /*idVendor*/
HIBYTE(USBD_VID), /*idVendor*/
LOBYTE(USBD_PID), /*idProduct*/
HIBYTE(USBD_PID), /*idProduct*/
0x00, /*bcdDevice rel. 2.00*/
0x02,
USBD_IDX_MFC_STR, /*Index of manufacturer string*/
USBD_IDX_PRODUCT_STR, /*Index of product string*/
USBD_IDX_SERIAL_STR, /*Index of serial number string*/
USBD_MAX_NUM_CONFIGURATION /*bNumConfigurations*/
};
/* USB_DeviceDescriptor */
/**
* @}
*/
/** @defgroup USBD_DESC_Private_Variables USBD_DESC_Private_Variables
* @brief Private variables.
* @{
*/
#if defined ( __ICCARM__ ) /* IAR Compiler */
#pragma data_alignment=4
#endif /* defined ( __ICCARM__ ) */
/** USB lang identifier descriptor. */
__ALIGN_BEGIN uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_END =
{
USB_LEN_LANGID_STR_DESC,
USB_DESC_TYPE_STRING,
LOBYTE(USBD_LANGID_STRING),
HIBYTE(USBD_LANGID_STRING)
};
#if defined ( __ICCARM__ ) /* IAR Compiler */
#pragma data_alignment=4
#endif /* defined ( __ICCARM__ ) */
/* Internal string descriptor. */
__ALIGN_BEGIN uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
#if defined ( __ICCARM__ ) /*!< IAR Compiler */
#pragma data_alignment=4
#endif
__ALIGN_BEGIN uint8_t USBD_StringSerial[USB_SIZ_STRING_SERIAL] __ALIGN_END = {
USB_SIZ_STRING_SERIAL,
USB_DESC_TYPE_STRING,
};
/**
* @}
*/
/** @defgroup USBD_DESC_Private_Functions USBD_DESC_Private_Functions
* @brief Private functions.
* @{
*/
/**
* @brief Return the device descriptor
* @param speed : Current device speed
* @param length : Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t * USBD_CDC_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
*length = sizeof(USBD_CDC_DeviceDesc);
return USBD_CDC_DeviceDesc;
}
/**
* @brief Return the LangID string descriptor
* @param speed : Current device speed
* @param length : Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t * USBD_CDC_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
*length = sizeof(USBD_LangIDDesc);
return USBD_LangIDDesc;
}
/**
* @brief Return the product string descriptor
* @param speed : Current device speed
* @param length : Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t * USBD_CDC_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
if(speed == 0)
{
USBD_GetString((uint8_t *)USBD_PRODUCT_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString((uint8_t *)USBD_PRODUCT_STRING, USBD_StrDesc, length);
}
return USBD_StrDesc;
}
/**
* @brief Return the manufacturer string descriptor
* @param speed : Current device speed
* @param length : Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t * USBD_CDC_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
return USBD_StrDesc;
}
/**
* @brief Return the serial number string descriptor
* @param speed : Current device speed
* @param length : Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t * USBD_CDC_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
UNUSED(speed);
*length = USB_SIZ_STRING_SERIAL;
/* Update the serial number string descriptor with the data from the unique
* ID */
Get_SerialNum();
/* USER CODE BEGIN USBD_CDC_SerialStrDescriptor */
/* USER CODE END USBD_CDC_SerialStrDescriptor */
return (uint8_t *) USBD_StringSerial;
}
/**
* @brief Return the configuration string descriptor
* @param speed : Current device speed
* @param length : Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t * USBD_CDC_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
if(speed == USBD_SPEED_HIGH)
{
USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString((uint8_t *)USBD_CONFIGURATION_STRING, USBD_StrDesc, length);
}
return USBD_StrDesc;
}
/**
* @brief Return the interface string descriptor
* @param speed : Current device speed
* @param length : Pointer to data length variable
* @retval Pointer to descriptor buffer
*/
uint8_t * USBD_CDC_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
{
if(speed == 0)
{
USBD_GetString((uint8_t *)USBD_INTERFACE_STRING, USBD_StrDesc, length);
}
else
{
USBD_GetString((uint8_t *)USBD_INTERFACE_STRING, USBD_StrDesc, length);
}
return USBD_StrDesc;
}
/**
* @brief Create the serial number string descriptor
* @param None
* @retval None
*/
static void Get_SerialNum(void)
{
uint32_t deviceserial0, deviceserial1, deviceserial2;
deviceserial0 = *(uint32_t *) DEVICE_ID1;
deviceserial1 = *(uint32_t *) DEVICE_ID2;
deviceserial2 = *(uint32_t *) DEVICE_ID3;
deviceserial0 += deviceserial2;
if (deviceserial0 != 0)
{
IntToUnicode(deviceserial0, &USBD_StringSerial[2], 8);
IntToUnicode(deviceserial1, &USBD_StringSerial[18], 4);
}
}
/**
* @brief Convert Hex 32Bits value into char
* @param value: value to convert
* @param pbuf: pointer to the buffer
* @param len: buffer length
* @retval None
*/
static void IntToUnicode(uint32_t value, uint8_t * pbuf, uint8_t len)
{
uint8_t idx = 0;
for (idx = 0; idx < len; idx++)
{
if (((value >> 28)) < 0xA)
{
pbuf[2 * idx] = (value >> 28) + '0';
}
else
{
pbuf[2 * idx] = (value >> 28) + 'A' - 10;
}
value = value << 4;
pbuf[2 * idx + 1] = 0;
}
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/

View File

@@ -0,0 +1,143 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : usbd_desc.c
* @version : v3.0_Cube
* @brief : Header for usbd_conf.c file.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_DESC__C__
#define __USBD_DESC__C__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbd_def.h"
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
* @{
*/
/** @defgroup USBD_DESC USBD_DESC
* @brief Usb device descriptors module.
* @{
*/
/** @defgroup USBD_DESC_Exported_Constants USBD_DESC_Exported_Constants
* @brief Constants.
* @{
*/
#define DEVICE_ID1 (UID_BASE)
#define DEVICE_ID2 (UID_BASE + 0x4)
#define DEVICE_ID3 (UID_BASE + 0x8)
#define USB_SIZ_STRING_SERIAL 0x1A
/* USER CODE BEGIN EXPORTED_CONSTANTS */
/* USER CODE END EXPORTED_CONSTANTS */
/**
* @}
*/
/** @defgroup USBD_DESC_Exported_Defines USBD_DESC_Exported_Defines
* @brief Defines.
* @{
*/
/* USER CODE BEGIN EXPORTED_DEFINES */
/* USER CODE END EXPORTED_DEFINES */
/**
* @}
*/
/** @defgroup USBD_DESC_Exported_TypesDefinitions USBD_DESC_Exported_TypesDefinitions
* @brief Types.
* @{
*/
/* USER CODE BEGIN EXPORTED_TYPES */
/* USER CODE END EXPORTED_TYPES */
/**
* @}
*/
/** @defgroup USBD_DESC_Exported_Macros USBD_DESC_Exported_Macros
* @brief Aliases.
* @{
*/
/* USER CODE BEGIN EXPORTED_MACRO */
/* USER CODE END EXPORTED_MACRO */
/**
* @}
*/
/** @defgroup USBD_DESC_Exported_Variables USBD_DESC_Exported_Variables
* @brief Public variables.
* @{
*/
extern USBD_DescriptorsTypeDef CDC_Desc;
/* USER CODE BEGIN EXPORTED_VARIABLES */
/* USER CODE END EXPORTED_VARIABLES */
/**
* @}
*/
/** @defgroup USBD_DESC_Exported_FunctionsPrototype USBD_DESC_Exported_FunctionsPrototype
* @brief Public functions declaration.
* @{
*/
/* USER CODE BEGIN EXPORTED_FUNCTIONS */
/* USER CODE END EXPORTED_FUNCTIONS */
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USBD_DESC__C__ */

View File

@@ -0,0 +1,796 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : Target/usbd_conf.c
* @version : v3.0_Cube
* @brief : This file implements the board support package for the USB device library
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "stm32g4xx.h"
#include "stm32g4xx_hal.h"
#include "usbd_def.h"
#include "usbd_core.h"
#include "usbd_cdc.h"
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
PCD_HandleTypeDef hpcd_USB_FS;
void Error_Handler(void);
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/* Exported function prototypes ----------------------------------------------*/
/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
/* USER CODE END PFP */
/* Private functions ---------------------------------------------------------*/
static USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status);
/* USER CODE BEGIN 1 */
static void SystemClockConfig_Resume(void);
/* USER CODE END 1 */
extern void SystemClock_Config(void);
/*******************************************************************************
LL Driver Callbacks (PCD -> USB Device Library)
*******************************************************************************/
/* MSP Init */
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
#else
void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
if(pcdHandle->Instance==USB)
{
/* USER CODE BEGIN USB_MspInit 0 */
/* USER CODE END USB_MspInit 0 */
/** Initializes the peripherals clocks
*/
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB;
PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
{
Error_Handler();
}
/* Peripheral clock enable */
__HAL_RCC_USB_CLK_ENABLE();
/* Peripheral interrupt init */
HAL_NVIC_SetPriority(USB_LP_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USB_LP_IRQn);
/* USER CODE BEGIN USB_MspInit 1 */
/* USER CODE END USB_MspInit 1 */
}
}
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void HAL_PCD_MspDeInit(PCD_HandleTypeDef* pcdHandle)
#else
void HAL_PCD_MspDeInit(PCD_HandleTypeDef* pcdHandle)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
if(pcdHandle->Instance==USB)
{
/* USER CODE BEGIN USB_MspDeInit 0 */
/* USER CODE END USB_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USB_CLK_DISABLE();
/* Peripheral interrupt Deinit*/
HAL_NVIC_DisableIRQ(USB_LP_IRQn);
/* USER CODE BEGIN USB_MspDeInit 1 */
/* USER CODE END USB_MspDeInit 1 */
}
}
/**
* @brief Setup stage callback
* @param hpcd: PCD handle
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
#else
void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_SetupStageCallback_PreTreatment */
/* USER CODE END HAL_PCD_SetupStageCallback_PreTreatment */
USBD_LL_SetupStage((USBD_HandleTypeDef*)hpcd->pData, (uint8_t *)hpcd->Setup);
/* USER CODE BEGIN HAL_PCD_SetupStageCallback_PostTreatment */
/* USER CODE END HAL_PCD_SetupStageCallback_PostTreatment */
}
/**
* @brief Data Out stage callback.
* @param hpcd: PCD handle
* @param epnum: Endpoint number
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#else
void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_DataOutStageCallback_PreTreatment */
/* USER CODE END HAL_PCD_DataOutStageCallback_PreTreatment */
USBD_LL_DataOutStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff);
/* USER CODE BEGIN HAL_PCD_DataOutStageCallback_PostTreatment */
/* USER CODE END HAL_PCD_DataOutStageCallback_PostTreatment */
}
/**
* @brief Data In stage callback.
* @param hpcd: PCD handle
* @param epnum: Endpoint number
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#else
void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_DataInStageCallback_PreTreatment */
/* USER CODE END HAL_PCD_DataInStageCallback_PreTreatment */
USBD_LL_DataInStage((USBD_HandleTypeDef*)hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff);
/* USER CODE BEGIN HAL_PCD_DataInStageCallback_PostTreatment */
/* USER CODE END HAL_PCD_DataInStageCallback_PostTreatment */
}
/**
* @brief SOF callback.
* @param hpcd: PCD handle
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
#else
void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_SOFCallback_PreTreatment */
/* USER CODE END HAL_PCD_SOFCallback_PreTreatment */
USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData);
/* USER CODE BEGIN HAL_PCD_SOFCallback_PostTreatment */
/* USER CODE END HAL_PCD_SOFCallback_PostTreatment */
}
/**
* @brief Reset callback.
* @param hpcd: PCD handle
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
#else
void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_ResetCallback_PreTreatment */
/* USER CODE END HAL_PCD_ResetCallback_PreTreatment */
USBD_SpeedTypeDef speed = USBD_SPEED_FULL;
if ( hpcd->Init.speed != PCD_SPEED_FULL)
{
Error_Handler();
}
/* Set Speed. */
USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed);
/* Reset Device. */
USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData);
/* USER CODE BEGIN HAL_PCD_ResetCallback_PostTreatment */
/* USER CODE END HAL_PCD_ResetCallback_PostTreatment */
}
/**
* @brief Suspend callback.
* When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support it)
* @param hpcd: PCD handle
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
#else
void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_SuspendCallback_PreTreatment */
/* USER CODE END HAL_PCD_SuspendCallback_PreTreatment */
/* Inform USB library that core enters in suspend Mode. */
USBD_LL_Suspend((USBD_HandleTypeDef*)hpcd->pData);
/* Enter in STOP mode. */
/* USER CODE BEGIN 2 */
if (hpcd->Init.low_power_enable)
{
/* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */
SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
}
/* USER CODE END 2 */
/* USER CODE BEGIN HAL_PCD_SuspendCallback_PostTreatment */
/* USER CODE END HAL_PCD_SuspendCallback_PostTreatment */
}
/**
* @brief Resume callback.
* When Low power mode is enabled the debug cannot be used (IAR, Keil doesn't support it)
* @param hpcd: PCD handle
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
#else
void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_ResumeCallback_PreTreatment */
/* USER CODE END HAL_PCD_ResumeCallback_PreTreatment */
/* USER CODE BEGIN 3 */
if (hpcd->Init.low_power_enable)
{
/* Reset SLEEPDEEP bit of Cortex System Control Register. */
SCB->SCR &= (uint32_t)~((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
SystemClockConfig_Resume();
}
/* USER CODE END 3 */
USBD_LL_Resume((USBD_HandleTypeDef*)hpcd->pData);
/* USER CODE BEGIN HAL_PCD_ResumeCallback_PostTreatment */
/* USER CODE END HAL_PCD_ResumeCallback_PostTreatment */
}
/**
* @brief ISOOUTIncomplete callback.
* @param hpcd: PCD handle
* @param epnum: Endpoint number
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#else
void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_ISOOUTIncompleteCallback_PreTreatment */
/* USER CODE END HAL_PCD_ISOOUTIncompleteCallback_PreTreatment */
USBD_LL_IsoOUTIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
/* USER CODE BEGIN HAL_PCD_ISOOUTIncompleteCallback_PostTreatment */
/* USER CODE END HAL_PCD_ISOOUTIncompleteCallback_PostTreatment */
}
/**
* @brief ISOINIncomplete callback.
* @param hpcd: PCD handle
* @param epnum: Endpoint number
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#else
void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_ISOINIncompleteCallback_PreTreatment */
/* USER CODE END HAL_PCD_ISOINIncompleteCallback_PreTreatment */
USBD_LL_IsoINIncomplete((USBD_HandleTypeDef*)hpcd->pData, epnum);
/* USER CODE BEGIN HAL_PCD_ISOINIncompleteCallback_PostTreatment */
/* USER CODE END HAL_PCD_ISOINIncompleteCallback_PostTreatment */
}
/**
* @brief Connect callback.
* @param hpcd: PCD handle
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
#else
void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_ConnectCallback_PreTreatment */
/* USER CODE END HAL_PCD_ConnectCallback_PreTreatment */
USBD_LL_DevConnected((USBD_HandleTypeDef*)hpcd->pData);
/* USER CODE BEGIN HAL_PCD_ConnectCallback_PostTreatment */
/* USER CODE END HAL_PCD_ConnectCallback_PostTreatment */
}
/**
* @brief Disconnect callback.
* @param hpcd: PCD handle
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
#else
void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN HAL_PCD_DisconnectCallback_PreTreatment */
/* USER CODE END HAL_PCD_DisconnectCallback_PreTreatment */
USBD_LL_DevDisconnected((USBD_HandleTypeDef*)hpcd->pData);
/* USER CODE BEGIN HAL_PCD_DisconnectCallback_PostTreatment */
/* USER CODE END HAL_PCD_DisconnectCallback_PostTreatment */
}
/* USER CODE BEGIN LowLevelInterface */
/* USER CODE END LowLevelInterface */
/*******************************************************************************
LL Driver Interface (USB Device Library --> PCD)
*******************************************************************************/
/**
* @brief Initializes the low level portion of the device driver.
* @param pdev: Device handle
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
{
/* Init USB Ip. */
hpcd_USB_FS.pData = pdev;
/* Link the driver to the stack. */
pdev->pData = &hpcd_USB_FS;
hpcd_USB_FS.Instance = USB;
hpcd_USB_FS.Init.dev_endpoints = 8;
hpcd_USB_FS.Init.speed = PCD_SPEED_FULL;
hpcd_USB_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
hpcd_USB_FS.Init.Sof_enable = DISABLE;
hpcd_USB_FS.Init.low_power_enable = DISABLE;
hpcd_USB_FS.Init.lpm_enable = DISABLE;
hpcd_USB_FS.Init.battery_charging_enable = DISABLE;
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
/* register Msp Callbacks (before the Init) */
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_MSPINIT_CB_ID, PCD_MspInit);
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_MSPDEINIT_CB_ID, PCD_MspDeInit);
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
if (HAL_PCD_Init(&hpcd_USB_FS) != HAL_OK)
{
Error_Handler( );
}
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
/* Register USB PCD CallBacks */
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SOF_CB_ID, PCD_SOFCallback);
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SETUPSTAGE_CB_ID, PCD_SetupStageCallback);
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESET_CB_ID, PCD_ResetCallback);
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_SUSPEND_CB_ID, PCD_SuspendCallback);
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_RESUME_CB_ID, PCD_ResumeCallback);
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_CONNECT_CB_ID, PCD_ConnectCallback);
HAL_PCD_RegisterCallback(&hpcd_USB_FS, HAL_PCD_DISCONNECT_CB_ID, PCD_DisconnectCallback);
/* USER CODE BEGIN RegisterCallBackFirstPart */
/* USER CODE END RegisterCallBackFirstPart */
HAL_PCD_RegisterLpmCallback(&hpcd_USB_FS, PCDEx_LPM_Callback);
HAL_PCD_RegisterDataOutStageCallback(&hpcd_USB_FS, PCD_DataOutStageCallback);
HAL_PCD_RegisterDataInStageCallback(&hpcd_USB_FS, PCD_DataInStageCallback);
HAL_PCD_RegisterIsoOutIncpltCallback(&hpcd_USB_FS, PCD_ISOOUTIncompleteCallback);
HAL_PCD_RegisterIsoInIncpltCallback(&hpcd_USB_FS, PCD_ISOINIncompleteCallback);
/* USER CODE BEGIN RegisterCallBackSecondPart */
/* USER CODE END RegisterCallBackSecondPart */
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
/* USER CODE BEGIN EndPoint_Configuration */
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x00 , PCD_SNG_BUF, 0x18);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58);
/* USER CODE END EndPoint_Configuration */
/* USER CODE BEGIN EndPoint_Configuration_CDC */
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x81 , PCD_SNG_BUF, 0xC0);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x01 , PCD_SNG_BUF, 0x110);
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x82 , PCD_SNG_BUF, 0x100);
/* USER CODE END EndPoint_Configuration_CDC */
return USBD_OK;
}
/**
* @brief De-Initializes the low level portion of the device driver.
* @param pdev: Device handle
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_DeInit(pdev->pData);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Starts the low level portion of the device driver.
* @param pdev: Device handle
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_Start(pdev->pData);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Stops the low level portion of the device driver.
* @param pdev: Device handle
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_Stop(pdev->pData);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Opens an endpoint of the low level driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @param ep_type: Endpoint type
* @param ep_mps: Endpoint max packet size
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Closes an endpoint of the low level driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_Close(pdev->pData, ep_addr);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Flushes an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_Flush(pdev->pData, ep_addr);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Sets a Stall condition on an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_SetStall(pdev->pData, ep_addr);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Clears a Stall condition on an endpoint of the Low Level Driver.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_ClrStall(pdev->pData, ep_addr);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Returns Stall condition.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @retval Stall (1: Yes, 0: No)
*/
uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef*) pdev->pData;
if((ep_addr & 0x80) == 0x80)
{
return hpcd->IN_ep[ep_addr & 0x7F].is_stall;
}
else
{
return hpcd->OUT_ep[ep_addr & 0x7F].is_stall;
}
}
/**
* @brief Assigns a USB address to the device.
* @param pdev: Device handle
* @param dev_addr: Device address
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_SetAddress(pdev->pData, dev_addr);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Transmits data over an endpoint.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @param pbuf: Pointer to data to be sent
* @param size: Data size
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Prepares an endpoint for reception.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @param pbuf: Pointer to data to be received
* @param size: Data size
* @retval USBD status
*/
USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size);
usb_status = USBD_Get_USB_Status(hal_status);
return usb_status;
}
/**
* @brief Returns the last transferred packet size.
* @param pdev: Device handle
* @param ep_addr: Endpoint number
* @retval Received Data Size
*/
uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
{
return HAL_PCD_EP_GetRxCount((PCD_HandleTypeDef*) pdev->pData, ep_addr);
}
/**
* @brief Send LPM message to user layer
* @param hpcd: PCD handle
* @param msg: LPM message
* @retval None
*/
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
static void PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg)
#else
void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg)
#endif /* USE_HAL_PCD_REGISTER_CALLBACKS */
{
/* USER CODE BEGIN LPM_Callback */
switch (msg)
{
case PCD_LPM_L0_ACTIVE:
if (hpcd->Init.low_power_enable)
{
SystemClockConfig_Resume();
/* Reset SLEEPDEEP bit of Cortex System Control Register. */
SCB->SCR &= (uint32_t)~((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
}
USBD_LL_Resume(hpcd->pData);
break;
case PCD_LPM_L1_ACTIVE:
USBD_LL_Suspend(hpcd->pData);
/* Enter in STOP mode. */
if (hpcd->Init.low_power_enable)
{
/* Set SLEEPDEEP bit and SleepOnExit of Cortex System Control Register. */
SCB->SCR |= (uint32_t)((uint32_t)(SCB_SCR_SLEEPDEEP_Msk | SCB_SCR_SLEEPONEXIT_Msk));
}
break;
}
/* USER CODE END LPM_Callback */
}
/**
* @brief Delays routine for the USB Device Library.
* @param Delay: Delay in ms
* @retval None
*/
void USBD_LL_Delay(uint32_t Delay)
{
HAL_Delay(Delay);
}
/**
* @brief Static single allocation.
* @param size: Size of allocated memory
* @retval None
*/
void *USBD_static_malloc(uint32_t size)
{
static uint32_t mem[(sizeof(USBD_CDC_HandleTypeDef)/4)+1];/* On 32-bit boundary */
return mem;
}
/**
* @brief Dummy memory free
* @param p: Pointer to allocated memory address
* @retval None
*/
void USBD_static_free(void *p)
{
}
/* USER CODE BEGIN 5 */
/**
* @brief Configures system clock after wake-up from USB resume callBack:
* enable HSI, PLL and select PLL as system clock source.
* @retval None
*/
static void SystemClockConfig_Resume(void)
{
SystemClock_Config();
}
/* USER CODE END 5 */
/**
* @brief Returns the USB status depending on the HAL status:
* @param hal_status: HAL status
* @retval USB status
*/
USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status)
{
USBD_StatusTypeDef usb_status = USBD_OK;
switch (hal_status)
{
case HAL_OK :
usb_status = USBD_OK;
break;
case HAL_ERROR :
usb_status = USBD_FAIL;
break;
case HAL_BUSY :
usb_status = USBD_BUSY;
break;
case HAL_TIMEOUT :
usb_status = USBD_FAIL;
break;
default :
usb_status = USBD_FAIL;
break;
}
return usb_status;
}

View File

@@ -0,0 +1,175 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : usbd_conf.h
* @version : v3.0_Cube
* @brief : Header for usbd_conf.c file.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBD_CONF__H__
#define __USBD_CONF__H__
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stm32g4xx.h"
#include "stm32g4xx_hal.h"
/* USER CODE BEGIN INCLUDE */
/* USER CODE END INCLUDE */
/** @addtogroup USBD_OTG_DRIVER
* @brief Driver for Usb device.
* @{
*/
/** @defgroup USBD_CONF USBD_CONF
* @brief Configuration file for Usb otg low level driver.
* @{
*/
/** @defgroup USBD_CONF_Exported_Variables USBD_CONF_Exported_Variables
* @brief Public variables.
* @{
*/
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
/* USER CODE END PV */
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_Defines USBD_CONF_Exported_Defines
* @brief Defines for configuration of the Usb device.
* @{
*/
/*---------- -----------*/
#define USBD_MAX_NUM_INTERFACES 1U
/*---------- -----------*/
#define USBD_MAX_NUM_CONFIGURATION 1U
/*---------- -----------*/
#define USBD_MAX_STR_DESC_SIZ 512U
/*---------- -----------*/
#define USBD_DEBUG_LEVEL 0U
/*---------- -----------*/
#define USBD_LPM_ENABLED 1U
/*---------- -----------*/
#define USBD_SELF_POWERED 1U
/****************************************/
/* #define for FS and HS identification */
#define DEVICE_FS 0
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_Macros USBD_CONF_Exported_Macros
* @brief Aliases.
* @{
*/
/* Memory management macros */
/** Alias for memory allocation. */
#define USBD_malloc (void *)USBD_static_malloc
/** Alias for memory release. */
#define USBD_free USBD_static_free
/** Alias for memory set. */
#define USBD_memset memset
/** Alias for memory copy. */
#define USBD_memcpy memcpy
/** Alias for delay. */
#define USBD_Delay HAL_Delay
/* DEBUG macros */
#if (USBD_DEBUG_LEVEL > 0)
#define USBD_UsrLog(...) printf(__VA_ARGS__);\
printf("\n");
#else
#define USBD_UsrLog(...)
#endif
#if (USBD_DEBUG_LEVEL > 1)
#define USBD_ErrLog(...) printf("ERROR: ") ;\
printf(__VA_ARGS__);\
printf("\n");
#else
#define USBD_ErrLog(...)
#endif
#if (USBD_DEBUG_LEVEL > 2)
#define USBD_DbgLog(...) printf("DEBUG : ") ;\
printf(__VA_ARGS__);\
printf("\n");
#else
#define USBD_DbgLog(...)
#endif
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_Types USBD_CONF_Exported_Types
* @brief Types.
* @{
*/
/**
* @}
*/
/** @defgroup USBD_CONF_Exported_FunctionsPrototype USBD_CONF_Exported_FunctionsPrototype
* @brief Declaration of public functions for Usb device.
* @{
*/
/* Exported functions -------------------------------------------------------*/
void *USBD_static_malloc(uint32_t size);
void USBD_static_free(void *p);
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __USBD_CONF__H__ */

View File

@@ -15,12 +15,14 @@ ADC1.Rank-2\#ChannelRegularConversion=1
ADC1.SamplingTime-2\#ChannelRegularConversion=ADC_SAMPLETIME_47CYCLES_5
ADC1.WatchdogChannel=ADC_CHANNEL_VOPAMP1
ADC1.master=1
ADC2.Channel-1\#ChannelRegularConversion=ADC_CHANNEL_VOPAMP2
ADC2.IPParameters=Rank-1\#ChannelRegularConversion,Channel-1\#ChannelRegularConversion,SamplingTime-1\#ChannelRegularConversion,OffsetNumber-1\#ChannelRegularConversion,NbrOfConversionFlag
ADC2.Channel-2\#ChannelRegularConversion=ADC_CHANNEL_VOPAMP2
ADC2.ContinuousConvMode=ENABLE
ADC2.DMAContinuousRequests=ENABLE
ADC2.IPParameters=Rank-2\#ChannelRegularConversion,Channel-2\#ChannelRegularConversion,SamplingTime-2\#ChannelRegularConversion,OffsetNumber-2\#ChannelRegularConversion,NbrOfConversionFlag,ContinuousConvMode,DMAContinuousRequests
ADC2.NbrOfConversionFlag=1
ADC2.OffsetNumber-1\#ChannelRegularConversion=ADC_OFFSET_NONE
ADC2.Rank-1\#ChannelRegularConversion=1
ADC2.SamplingTime-1\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5
ADC2.OffsetNumber-2\#ChannelRegularConversion=ADC_OFFSET_NONE
ADC2.Rank-2\#ChannelRegularConversion=1
ADC2.SamplingTime-2\#ChannelRegularConversion=ADC_SAMPLETIME_47CYCLES_5
ARM.CMSIS.5.7.0.CMSISJjCORE=true
ARM.CMSIS.5.7.0.CMSISJjCORE_Checked=true
ARM.CMSIS.5.7.0.CMSISJjDSP=Source
@@ -32,8 +34,10 @@ DAC1.DAC_DMADoubleDataMode-DAC_OUT1=DISABLE
DAC1.DAC_OutputBuffer-DAC_OUT1=DAC_OUTPUTBUFFER_ENABLE
DAC1.DAC_SampleAndHold-DAC_OUT1=DAC_SAMPLEANDHOLD_DISABLE
DAC1.DAC_SignedFormat-DAC_OUT1=ENABLE
DAC1.DAC_SignedFormat-DAC_OUT2=ENABLE
DAC1.DAC_Trigger_OUT1-DAC_OUT1=DAC_TRIGGER_T6_TRGO
DAC1.IPParameters=DAC_OutputBuffer-DAC_OUT1,DAC_SampleAndHold-DAC_OUT1,DAC_Trigger_OUT1-DAC_OUT1,DAC_SignedFormat-DAC_OUT1,DAC_DMADoubleDataMode-DAC_OUT1,DAC_Channel-DAC_OUT2
DAC1.DAC_Trigger_OUT2-DAC_OUT2=DAC_TRIGGER_T8_TRGO
DAC1.IPParameters=DAC_OutputBuffer-DAC_OUT1,DAC_SampleAndHold-DAC_OUT1,DAC_Trigger_OUT1-DAC_OUT1,DAC_SignedFormat-DAC_OUT1,DAC_DMADoubleDataMode-DAC_OUT1,DAC_Channel-DAC_OUT2,DAC_Trigger_OUT2-DAC_OUT2,DAC_SignedFormat-DAC_OUT2
Dma.ADC1.3.Direction=DMA_PERIPH_TO_MEMORY
Dma.ADC1.3.EventEnable=DISABLE
Dma.ADC1.3.Instance=DMA1_Channel1
@@ -51,6 +55,23 @@ Dma.ADC1.3.SyncEnable=DISABLE
Dma.ADC1.3.SyncPolarity=HAL_DMAMUX_SYNC_NO_EVENT
Dma.ADC1.3.SyncRequestNumber=1
Dma.ADC1.3.SyncSignalID=NONE
Dma.ADC2.4.Direction=DMA_PERIPH_TO_MEMORY
Dma.ADC2.4.EventEnable=DISABLE
Dma.ADC2.4.Instance=DMA1_Channel3
Dma.ADC2.4.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
Dma.ADC2.4.MemInc=DMA_MINC_ENABLE
Dma.ADC2.4.Mode=DMA_CIRCULAR
Dma.ADC2.4.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
Dma.ADC2.4.PeriphInc=DMA_PINC_DISABLE
Dma.ADC2.4.Polarity=HAL_DMAMUX_REQ_GEN_RISING
Dma.ADC2.4.Priority=DMA_PRIORITY_LOW
Dma.ADC2.4.RequestNumber=1
Dma.ADC2.4.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,SignalID,Polarity,RequestNumber,SyncSignalID,SyncPolarity,SyncEnable,EventEnable,SyncRequestNumber
Dma.ADC2.4.SignalID=NONE
Dma.ADC2.4.SyncEnable=DISABLE
Dma.ADC2.4.SyncPolarity=HAL_DMAMUX_SYNC_NO_EVENT
Dma.ADC2.4.SyncRequestNumber=1
Dma.ADC2.4.SyncSignalID=NONE
Dma.DAC1_CH1.0.Direction=DMA_MEMORY_TO_PERIPH
Dma.DAC1_CH1.0.EventEnable=DISABLE
Dma.DAC1_CH1.0.Instance=DMA1_Channel2
@@ -89,7 +110,8 @@ Dma.Request0=DAC1_CH1
Dma.Request1=DAC1_CH2
Dma.Request2=USART1_TX
Dma.Request3=ADC1
Dma.RequestsNb=4
Dma.Request4=ADC2
Dma.RequestsNb=5
Dma.USART1_TX.2.Direction=DMA_MEMORY_TO_PERIPH
Dma.USART1_TX.2.EventEnable=DISABLE
Dma.USART1_TX.2.Instance=DMA1_Channel5
@@ -115,60 +137,57 @@ KeepUserPlacement=false
Mcu.Family=STM32G4
Mcu.IP0=ADC1
Mcu.IP1=ADC2
Mcu.IP10=RCC
Mcu.IP11=SYS
Mcu.IP12=TIM6
Mcu.IP13=TIM7
Mcu.IP14=TIM8
Mcu.IP15=USART1
Mcu.IP16=USB
Mcu.IP10=SYS
Mcu.IP11=TIM6
Mcu.IP12=TIM7
Mcu.IP13=TIM8
Mcu.IP14=USART1
Mcu.IP15=USB
Mcu.IP16=USB_DEVICE
Mcu.IP2=CORDIC
Mcu.IP3=DAC1
Mcu.IP4=DAC3
Mcu.IP5=DMA
Mcu.IP6=I2C1
Mcu.IP7=NVIC
Mcu.IP8=OPAMP1
Mcu.IP9=OPAMP2
Mcu.IP4=DMA
Mcu.IP5=I2C1
Mcu.IP6=NVIC
Mcu.IP7=OPAMP1
Mcu.IP8=OPAMP2
Mcu.IP9=RCC
Mcu.IPNb=17
Mcu.Name=STM32G431K(6-8-B)Tx
Mcu.Package=LQFP32
Mcu.Pin0=PF0-OSC_IN
Mcu.Pin1=PF1-OSC_OUT
Mcu.Pin10=PB0
Mcu.Pin11=PA8
Mcu.Pin12=PA9
Mcu.Pin13=PA10
Mcu.Pin14=PA11
Mcu.Pin15=PA12
Mcu.Pin16=PA13
Mcu.Pin17=PA14
Mcu.Pin18=PA15
Mcu.Pin19=PB3
Mcu.Pin2=PA0
Mcu.Pin20=PB4
Mcu.Pin21=PB5
Mcu.Pin22=PB6
Mcu.Pin23=PB7
Mcu.Pin24=VP_ADC1_OPAMP_INTERNAL1
Mcu.Pin25=VP_ADC2_OPAMP_INTERNAL2
Mcu.Pin26=VP_CORDIC_VS_CORDIC
Mcu.Pin27=VP_DAC3_VS_DACI1
Mcu.Pin28=VP_SYS_VS_Systick
Mcu.Pin29=VP_SYS_VS_DBSignals
Mcu.Pin3=PA1
Mcu.Pin30=VP_TIM6_VS_ClockSourceINT
Mcu.Pin31=VP_TIM7_VS_ClockSourceINT
Mcu.Pin32=VP_TIM8_VS_ClockSourceINT
Mcu.Pin33=VP_ARM.CMSIS_VS_CMSISJjCORE_5.4.0_5.7.0
Mcu.Pin34=VP_ARM.CMSIS_VS_CMSISJjDSP_1.8.0_5.7.0
Mcu.Pin4=PA2
Mcu.Pin5=PA3
Mcu.Pin6=PA4
Mcu.Pin7=PA5
Mcu.Pin8=PA6
Mcu.Pin10=PA9
Mcu.Pin11=PA10
Mcu.Pin12=PA11
Mcu.Pin13=PA12
Mcu.Pin14=PA13
Mcu.Pin15=PA14
Mcu.Pin16=PA15
Mcu.Pin17=PB5
Mcu.Pin18=PB6
Mcu.Pin19=PB7
Mcu.Pin2=PG10-NRST
Mcu.Pin20=PB8-BOOT0
Mcu.Pin21=VP_ADC1_OPAMP_INTERNAL1
Mcu.Pin22=VP_ADC2_OPAMP_INTERNAL2
Mcu.Pin23=VP_CORDIC_VS_CORDIC
Mcu.Pin24=VP_SYS_VS_Systick
Mcu.Pin25=VP_SYS_VS_DBSignals
Mcu.Pin26=VP_TIM6_VS_ClockSourceINT
Mcu.Pin27=VP_TIM7_VS_ClockSourceINT
Mcu.Pin28=VP_TIM8_VS_ClockSourceINT
Mcu.Pin29=VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS
Mcu.Pin3=PA0
Mcu.Pin30=VP_ARM.CMSIS_VS_CMSISJjCORE_5.4.0_5.7.0
Mcu.Pin31=VP_ARM.CMSIS_VS_CMSISJjDSP_1.8.0_5.7.0
Mcu.Pin4=PA1
Mcu.Pin5=PA2
Mcu.Pin6=PA3
Mcu.Pin7=PA4
Mcu.Pin8=PA5
Mcu.Pin9=PA7
Mcu.PinsNb=35
Mcu.PinsNb=32
Mcu.ThirdParty0=ARM.CMSIS.5.7.0
Mcu.ThirdPartyNb=1
Mcu.UserConstants=
@@ -179,6 +198,7 @@ NVIC.ADC1_2_IRQn=true\:0\:0\:false\:false\:true\:true\:true
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.DMA1_Channel1_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.DMA1_Channel2_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.DMA1_Channel3_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.DMA1_Channel4_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.DMA1_Channel5_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false
@@ -192,6 +212,7 @@ NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.TIM7_IRQn=true\:0\:0\:false\:false\:true\:true\:true
NVIC.USART1_IRQn=true\:0\:0\:false\:false\:true\:true\:true
NVIC.USB_LP_IRQn=true\:0\:0\:false\:false\:true\:false\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
OPAMP1.IPParameters=PowerMode,PgaGain
OPAMP1.PgaGain=OPAMP_PGA_GAIN_64_OR_MINUS_63
@@ -234,34 +255,14 @@ PA3.Mode=PGA Internally connected_IO0_BIAS
PA3.Signal=OPAMP1_VINM0
PA4.Signal=COMP_DAC11_group
PA5.Signal=COMP_DAC12_group
PA6.GPIOParameters=GPIO_PuPd,GPIO_Label
PA6.GPIO_Label=GPIO5
PA6.GPIO_PuPd=GPIO_NOPULL
PA6.Locked=true
PA6.Signal=GPIO_Output
PA7.Locked=true
PA7.Mode=Follower_Internally_Connected
PA7.Signal=OPAMP2_VINP
PA8.Locked=true
PA8.Mode=Clock-out
PA8.Signal=RCC_MCO
PA9.GPIOParameters=GPIO_FM6
PA9.GPIO_FM6=__NULL
PA9.Locked=true
PA9.Mode=Asynchronous
PA9.Signal=USART1_TX
PB0.GPIOParameters=GPIO_PuPd,GPIO_Label
PB0.GPIO_Label=GPIO4
PB0.GPIO_PuPd=GPIO_NOPULL
PB0.Locked=true
PB0.Signal=GPIO_Output
PB3.GPIOParameters=GPIO_Label
PB3.GPIO_Label=GPIO3
PB3.Locked=true
PB3.Signal=GPIO_Output
PB4.GPIOParameters=GPIO_Label
PB4.GPIO_Label=GPIO2
PB4.Locked=true
PB4.Signal=GPIO_Output
PB5.GPIOParameters=GPIO_Label
PB5.GPIO_Label=GPIO1
PB5.Locked=true
@@ -273,10 +274,12 @@ PB6.Locked=true
PB6.Signal=GPIO_Input
PB7.Mode=I2C
PB7.Signal=I2C1_SDA
PB8-BOOT0.Locked=true
PF0-OSC_IN.Mode=HSE-External-Oscillator
PF0-OSC_IN.Signal=RCC_OSC_IN
PF1-OSC_OUT.Mode=HSE-External-Oscillator
PF1-OSC_OUT.Signal=RCC_OSC_OUT
PG10-NRST.Locked=true
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
@@ -305,7 +308,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=Makefile
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-SystemClock_Config-RCC-false-HAL-false,4-MX_DAC1_Init-DAC1-false-HAL-true,5-MX_ADC1_Init-ADC1-false-HAL-true,6-MX_TIM7_Init-TIM7-false-HAL-true,7-MX_TIM6_Init-TIM6-false-HAL-true,8-MX_CORDIC_Init-CORDIC-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true,10-MX_TIM8_Init-TIM8-false-HAL-true,11-MX_OPAMP1_Init-OPAMP1-false-HAL-true,12-MX_ADC2_Init-ADC2-false-HAL-true,13-MX_DAC3_Init-DAC3-false-HAL-true,14-MX_OPAMP2_Init-OPAMP2-false-HAL-true,15-MX_USB_PCD_Init-USB-false-HAL-true,16-MX_I2C1_Init-I2C1-false-HAL-true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-SystemClock_Config-RCC-false-HAL-false,4-MX_DAC1_Init-DAC1-false-HAL-true,5-MX_ADC1_Init-ADC1-false-HAL-true,6-MX_TIM7_Init-TIM7-false-HAL-true,7-MX_TIM6_Init-TIM6-false-HAL-true,8-MX_CORDIC_Init-CORDIC-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true,10-MX_TIM8_Init-TIM8-false-HAL-true,11-MX_OPAMP1_Init-OPAMP1-false-HAL-true,12-MX_ADC2_Init-ADC2-false-HAL-true,13-MX_OPAMP2_Init-OPAMP2-false-HAL-true,14-MX_I2C1_Init-I2C1-false-HAL-true,15-MX_USB_Device_Init-USB_DEVICE-false-HAL-false
RCC.ADC12Freq_Value=168000000
RCC.AHBFreq_Value=168000000
RCC.APB1Freq_Value=168000000
@@ -370,6 +373,10 @@ TIM8.TIM_MasterOutputTrigger=TIM_TRGO_UPDATE
TIM8.TIM_MasterOutputTrigger2=TIM_TRGO2_RESET
USART1.IPParameters=VirtualMode-Asynchronous
USART1.VirtualMode-Asynchronous=VM_ASYNC
USB_DEVICE.CLASS_NAME_FS=CDC
USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS
USB_DEVICE.VirtualMode=Cdc
USB_DEVICE.VirtualModeFS=Cdc_FS
VP_ADC1_OPAMP_INTERNAL1.Mode=IN-OPAMP1
VP_ADC1_OPAMP_INTERNAL1.Signal=ADC1_OPAMP_INTERNAL1
VP_ADC2_OPAMP_INTERNAL2.Mode=IN-OPAMP2
@@ -380,8 +387,6 @@ VP_ARM.CMSIS_VS_CMSISJjDSP_1.8.0_5.7.0.Mode=CMSISJjDSP
VP_ARM.CMSIS_VS_CMSISJjDSP_1.8.0_5.7.0.Signal=ARM.CMSIS_VS_CMSISJjDSP_1.8.0_5.7.0
VP_CORDIC_VS_CORDIC.Mode=CORDIC_Activate
VP_CORDIC_VS_CORDIC.Signal=CORDIC_VS_CORDIC
VP_DAC3_VS_DACI1.Mode=DAC_OUT1_Int
VP_DAC3_VS_DACI1.Signal=DAC3_VS_DACI1
VP_SYS_VS_DBSignals.Mode=DisableDeadBatterySignals
VP_SYS_VS_DBSignals.Signal=SYS_VS_DBSignals
VP_SYS_VS_Systick.Mode=SysTick
@@ -392,5 +397,7 @@ VP_TIM7_VS_ClockSourceINT.Mode=Enable_Timer
VP_TIM7_VS_ClockSourceINT.Signal=TIM7_VS_ClockSourceINT
VP_TIM8_VS_ClockSourceINT.Mode=Internal
VP_TIM8_VS_ClockSourceINT.Signal=TIM8_VS_ClockSourceINT
VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Mode=CDC_FS
VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Signal=USB_DEVICE_VS_USB_DEVICE_CDC_FS
board=NUCLEO-G431KB
boardIOC=true

View File

@@ -1,101 +0,0 @@
build/BasicMathFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/BasicMathFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_and_u16.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_and_u32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_and_u8.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_not_u16.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_not_u32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_not_u8.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_or_u16.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_or_u32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_or_u8.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_xor_u16.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_xor_u32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_xor_u8.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_abs_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_add_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_and_u16.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_and_u32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_and_u8.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_mult_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_negate_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_not_u16.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_not_u32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_not_u8.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_offset_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_or_u16.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_or_u32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_or_u8.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_scale_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_sub_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_xor_u16.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_xor_u32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BasicMathFunctions/arm_xor_u8.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,9 +0,0 @@
build/BayesFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BayesFunctions/BayesFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BayesFunctions/arm_gaussian_naive_bayes_predict_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/BayesFunctions/arm_gaussian_naive_bayes_predict_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:

View File

@@ -1,119 +0,0 @@
ARM GAS /tmp/cc9QB8wm.s page 1
1 .cpu cortex-m4
2 .eabi_attribute 27, 1
3 .eabi_attribute 28, 1
4 .eabi_attribute 20, 1
5 .eabi_attribute 21, 1
6 .eabi_attribute 23, 3
7 .eabi_attribute 24, 1
8 .eabi_attribute 25, 1
9 .eabi_attribute 26, 1
10 .eabi_attribute 30, 2
11 .eabi_attribute 34, 1
12 .eabi_attribute 18, 4
13 .file "BayesFunctions.c"
14 .text
15 .section .text.arm_gaussian_naive_bayes_predict_f32,"ax",%progbits
16 .align 1
17 .p2align 2,,3
18 .global arm_gaussian_naive_bayes_predict_f32
19 .arch armv7e-m
20 .syntax unified
21 .thumb
22 .thumb_func
23 .fpu fpv4-sp-d16
25 arm_gaussian_naive_bayes_predict_f32:
26 @ args = 0, pretend = 0, frame = 24
27 @ frame_needed = 0, uses_anonymous_args = 0
28 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, r10, fp, lr}
29 0004 2DED068B vpush.64 {d8, d9, d10}
30 0008 87B0 sub sp, sp, #28
31 000a CDE90212 strd r1, r2, [sp, #8]
32 000e 4168 ldr r1, [r0, #4]
33 0010 0369 ldr r3, [r0, #16]
34 0012 8568 ldr r5, [r0, #8]
35 0014 C668 ldr r6, [r0, #12]
36 0016 0193 str r3, [sp, #4]
37 0018 0029 cmp r1, #0
38 001a 48D0 beq .L3
39 001c DFED29AA vldr.32 s21, .L11
40 0020 DFED299A vldr.32 s19, .L11+4
41 0024 8346 mov fp, r0
42 0026 9146 mov r9, r2
43 0028 BEEE00AA vmov.f32 s20, #-5.0e-1
44 002c 0027 movs r7, #0
45 .L2:
46 002e DBF80030 ldr r3, [fp]
47 0032 F0EE6A8A vmov.f32 s17, s21
48 0036 5BB3 cbz r3, .L6
49 0038 9FED249A vldr.32 s18, .L11+8
50 003c DDF808A0 ldr r10, [sp, #8]
51 0040 B046 mov r8, r6
52 0042 F0EE498A vmov.f32 s17, s18
53 0046 0024 movs r4, #0
54 .L4:
55 0048 B8EC018A vldmia.32 r8!, {s16}
56 004c DBED057A vldr.32 s15, [fp, #20]
57 0050 38EE278A vadd.f32 s16, s16, s15
58 0054 0134 adds r4, r4, #1
ARM GAS /tmp/cc9QB8wm.s page 2
59 0056 28EE290A vmul.f32 s0, s16, s19
60 005a FFF7FEFF bl logf
61 005e B5EC017A vldmia.32 r5!, {s14}
62 0062 FAEC017A vldmia.32 r10!, {s15}
63 0066 DBF80020 ldr r2, [fp]
64 006a 77EEC77A vsub.f32 s15, s15, s14
65 006e A242 cmp r2, r4
66 0070 67EEA77A vmul.f32 s15, s15, s15
67 0074 78EE808A vadd.f32 s17, s17, s0
68 0078 87EE887A vdiv.f32 s14, s15, s16
69 007c 4646 mov r6, r8
70 007e 39EE079A vadd.f32 s18, s18, s14
71 0082 E1D8 bhi .L4
72 0084 68EE8A8A vmul.f32 s17, s17, s20
73 0088 F6EE007A vmov.f32 s15, #5.0e-1
74 008c E9EE678A vfms.f32 s17, s18, s15
75 .L6:
76 0090 019B ldr r3, [sp, #4]
77 0092 B3EC010A vldmia.32 r3!, {s0}
78 0096 0193 str r3, [sp, #4]
79 0098 FFF7FEFF bl logf
80 009c DBF80410 ldr r1, [fp, #4]
81 00a0 30EE280A vadd.f32 s0, s0, s17
82 00a4 0137 adds r7, r7, #1
83 00a6 B942 cmp r1, r7
84 00a8 A9EC010A vstmia.32 r9!, {s0}
85 00ac BFD8 bhi .L2
86 .L3:
87 00ae 0398 ldr r0, [sp, #12]
88 00b0 05AB add r3, sp, #20
89 00b2 04AA add r2, sp, #16
90 00b4 FFF7FEFF bl arm_max_f32
91 00b8 0598 ldr r0, [sp, #20]
92 00ba 07B0 add sp, sp, #28
93 @ sp needed
94 00bc BDEC068B vldm sp!, {d8-d10}
95 00c0 BDE8F08F pop {r4, r5, r6, r7, r8, r9, r10, fp, pc}
96 .L12:
97 .align 2
98 .L11:
99 00c4 00000080 .word -2147483648
100 00c8 DB0FC940 .word 1086918619
101 00cc 00000000 .word 0
103 .ident "GCC: (15:10.3-2021.07-4) 10.3.1 20210621 (release)"
ARM GAS /tmp/cc9QB8wm.s page 3
DEFINED SYMBOLS
*ABS*:0000000000000000 BayesFunctions.c
/tmp/cc9QB8wm.s:16 .text.arm_gaussian_naive_bayes_predict_f32:0000000000000000 $t
/tmp/cc9QB8wm.s:25 .text.arm_gaussian_naive_bayes_predict_f32:0000000000000000 arm_gaussian_naive_bayes_predict_f32
/tmp/cc9QB8wm.s:99 .text.arm_gaussian_naive_bayes_predict_f32:00000000000000c4 $d
UNDEFINED SYMBOLS
logf
arm_max_f32

Binary file not shown.

View File

@@ -1,21 +0,0 @@
build/CommonTables.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/CommonTables/CommonTables.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/CommonTables/arm_common_tables.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/CommonTables/arm_const_structs.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_const_structs.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/CommonTables/arm_mve_tables.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/CommonTables/arm_common_tables.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/CommonTables/arm_const_structs.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_const_structs.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/CommonTables/arm_mve_tables.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,43 +0,0 @@
build/ComplexMathFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/ComplexMathFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_conj_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_conj_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_q31.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_conj_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_conj_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_dot_prod_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_dot_prod_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_squared_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mag_squared_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_cmplx_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_q31.c:

View File

@@ -1,789 +0,0 @@
ARM GAS /tmp/ccNDh4PL.s page 1
1 .cpu cortex-m4
2 .eabi_attribute 27, 1
3 .eabi_attribute 28, 1
4 .eabi_attribute 20, 1
5 .eabi_attribute 21, 1
6 .eabi_attribute 23, 3
7 .eabi_attribute 24, 1
8 .eabi_attribute 25, 1
9 .eabi_attribute 26, 1
10 .eabi_attribute 30, 2
11 .eabi_attribute 34, 1
12 .eabi_attribute 18, 4
13 .file "ComplexMathFunctions.c"
14 .text
15 .section .text.arm_cmplx_conj_f32,"ax",%progbits
16 .align 1
17 .p2align 2,,3
18 .global arm_cmplx_conj_f32
19 .arch armv7e-m
20 .syntax unified
21 .thumb
22 .thumb_func
23 .fpu fpv4-sp-d16
25 arm_cmplx_conj_f32:
26 @ args = 0, pretend = 0, frame = 0
27 @ frame_needed = 0, uses_anonymous_args = 0
28 @ link register save eliminated.
29 0000 82B1 cbz r2, .L1
30 0002 0830 adds r0, r0, #8
31 0004 0831 adds r1, r1, #8
32 .L3:
33 0006 0831 adds r1, r1, #8
34 0008 50F8083C ldr r3, [r0, #-8] @ float
35 000c 41F8103C str r3, [r1, #-16] @ float
36 0010 50ED017A vldr.32 s15, [r0, #-4]
37 0014 013A subs r2, r2, #1
38 0016 F1EE677A vneg.f32 s15, s15
39 001a 00F10800 add r0, r0, #8
40 001e 41ED037A vstr.32 s15, [r1, #-12]
41 0022 F0D1 bne .L3
42 .L1:
43 0024 7047 bx lr
45 0026 00BF .section .text.arm_cmplx_conj_q15,"ax",%progbits
46 .align 1
47 .p2align 2,,3
48 .global arm_cmplx_conj_q15
49 .syntax unified
50 .thumb
51 .thumb_func
52 .fpu fpv4-sp-d16
54 arm_cmplx_conj_q15:
55 @ args = 0, pretend = 0, frame = 0
56 @ frame_needed = 0, uses_anonymous_args = 0
57 0000 A2B1 cbz r2, .L17
58 0002 10B5 push {r4, lr}
59 0004 0023 movs r3, #0
60 0006 841C adds r4, r0, #2
ARM GAS /tmp/ccNDh4PL.s page 2
61 0008 01F1020E add lr, r1, #2
62 .L11:
63 000c 30F923C0 ldrsh ip, [r0, r3, lsl #2]
64 0010 21F823C0 strh ip, [r1, r3, lsl #2] @ movhi
65 0014 34F923C0 ldrsh ip, [r4, r3, lsl #2]
66 0018 CCF1000C rsb ip, ip, #0
67 .syntax unified
68 @ 193 "Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_conj_q15.c
69 001c 0CF30F0C ssat ip, #16, ip
70 @ 0 "" 2
71 .thumb
72 .syntax unified
73 0020 2EF823C0 strh ip, [lr, r3, lsl #2] @ movhi
74 0024 0133 adds r3, r3, #1
75 0026 9342 cmp r3, r2
76 0028 F0D1 bne .L11
77 002a 10BD pop {r4, pc}
78 .L17:
79 002c 7047 bx lr
81 002e 00BF .section .text.arm_cmplx_conj_q31,"ax",%progbits
82 .align 1
83 .p2align 2,,3
84 .global arm_cmplx_conj_q31
85 .syntax unified
86 .thumb
87 .thumb_func
88 .fpu fpv4-sp-d16
90 arm_cmplx_conj_q31:
91 @ args = 0, pretend = 0, frame = 0
92 @ frame_needed = 0, uses_anonymous_args = 0
93 0000 9AB1 cbz r2, .L28
94 0002 0023 movs r3, #0
95 0004 30B5 push {r4, r5, lr}
96 0006 9C46 mov ip, r3
97 0008 051D adds r5, r0, #4
98 000a 01F1040E add lr, r1, #4
99 .L22:
100 000e 50F83340 ldr r4, [r0, r3, lsl #3]
101 0012 41F83340 str r4, [r1, r3, lsl #3]
102 0016 55F83340 ldr r4, [r5, r3, lsl #3]
103 .syntax unified
104 @ 2125 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
105 001a 84FAACF4 qsub r4, ip, r4
106 @ 0 "" 2
107 .thumb
108 .syntax unified
109 001e 4EF83340 str r4, [lr, r3, lsl #3]
110 0022 0133 adds r3, r3, #1
111 0024 9342 cmp r3, r2
112 0026 F2D1 bne .L22
113 0028 30BD pop {r4, r5, pc}
114 .L28:
115 002a 7047 bx lr
117 .section .text.arm_cmplx_dot_prod_f32,"ax",%progbits
118 .align 1
119 .p2align 2,,3
120 .global arm_cmplx_dot_prod_f32
ARM GAS /tmp/ccNDh4PL.s page 3
121 .syntax unified
122 .thumb
123 .thumb_func
124 .fpu fpv4-sp-d16
126 arm_cmplx_dot_prod_f32:
127 @ args = 4, pretend = 0, frame = 0
128 @ frame_needed = 0, uses_anonymous_args = 0
129 @ link register save eliminated.
130 0000 DFED157A vldr.32 s15, .L36
131 0004 FAB1 cbz r2, .L34
132 0006 0830 adds r0, r0, #8
133 0008 B0EE677A vmov.f32 s14, s15
134 000c 0831 adds r1, r1, #8
135 .L33:
136 000e 10ED026A vldr.32 s12, [r0, #-8]
137 0012 51ED026A vldr.32 s13, [r1, #-8]
138 0016 51ED015A vldr.32 s11, [r1, #-4]
139 001a A6EE267A vfma.f32 s14, s12, s13
140 001e 013A subs r2, r2, #1
141 0020 01F10801 add r1, r1, #8
142 0024 E6EE257A vfma.f32 s15, s12, s11
143 0028 00F10800 add r0, r0, #8
144 002c 10ED036A vldr.32 s12, [r0, #-12]
145 0030 A6EE657A vfms.f32 s14, s12, s11
146 0034 E6EE267A vfma.f32 s15, s12, s13
147 0038 E9D1 bne .L33
148 003a 83ED007A vstr.32 s14, [r3]
149 003e 009B ldr r3, [sp]
150 0040 C3ED007A vstr.32 s15, [r3]
151 0044 7047 bx lr
152 .L34:
153 0046 B0EE677A vmov.f32 s14, s15
154 004a 83ED007A vstr.32 s14, [r3]
155 004e 009B ldr r3, [sp]
156 0050 C3ED007A vstr.32 s15, [r3]
157 0054 7047 bx lr
158 .L37:
159 0056 00BF .align 2
160 .L36:
161 0058 00000000 .word 0
163 .section .text.arm_cmplx_dot_prod_q15,"ax",%progbits
164 .align 1
165 .p2align 2,,3
166 .global arm_cmplx_dot_prod_q15
167 .syntax unified
168 .thumb
169 .thumb_func
170 .fpu fpv4-sp-d16
172 arm_cmplx_dot_prod_q15:
173 @ args = 4, pretend = 0, frame = 16
174 @ frame_needed = 0, uses_anonymous_args = 0
175 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, r10, fp, lr}
176 0004 85B0 sub sp, sp, #20
177 0006 0393 str r3, [sp, #12]
178 0008 C2B3 cbz r2, .L41
179 000a 0024 movs r4, #0
180 000c 0025 movs r5, #0
ARM GAS /tmp/ccNDh4PL.s page 4
181 000e CDE90045 strd r4, [sp]
182 0012 8F1C adds r7, r1, #2
183 0014 0023 movs r3, #0
184 0016 00F10208 add r8, r0, #2
185 001a A246 mov r10, r4
186 001c AB46 mov fp, r5
187 001e BE46 mov lr, r7
188 .L40:
189 0020 DDE90067 ldrd r6, [sp]
190 0024 30F923C0 ldrsh ip, [r0, r3, lsl #2]
191 0028 3EF92340 ldrsh r4, [lr, r3, lsl #2]
192 002c 38F92390 ldrsh r9, [r8, r3, lsl #2]
193 0030 31F92350 ldrsh r5, [r1, r3, lsl #2]
194 0034 CCFB8467 smlalbb r6, r7, ip, r4
195 0038 C5FB8967 smlalbb r6, r7, r5, r9
196 003c CDE90067 strd r6, [sp]
197 0040 5646 mov r6, r10
198 0042 5F46 mov r7, fp
199 0044 04FB09F4 mul r4, r4, r9
200 0048 CCFB8567 smlalbb r6, r7, ip, r5
201 004c B6EB040A subs r10, r6, r4
202 0050 03F10103 add r3, r3, #1
203 0054 67EBE47B sbc fp, r7, r4, asr #31
204 0058 9A42 cmp r2, r3
205 005a E1D1 bne .L40
206 005c DDE90001 ldrd r0, [sp]
207 0060 4FEA9A13 lsr r3, r10, #6
208 0064 8209 lsrs r2, r0, #6
209 0066 43EA8B63 orr r3, r3, fp, lsl #26
210 006a 42EA8162 orr r2, r2, r1, lsl #26
211 .L39:
212 006e 0399 ldr r1, [sp, #12]
213 0070 0B60 str r3, [r1]
214 0072 0E9B ldr r3, [sp, #56]
215 0074 1A60 str r2, [r3]
216 0076 05B0 add sp, sp, #20
217 @ sp needed
218 0078 BDE8F08F pop {r4, r5, r6, r7, r8, r9, r10, fp, pc}
219 .L41:
220 007c 1346 mov r3, r2
221 007e F6E7 b .L39
223 .section .text.arm_cmplx_dot_prod_q31,"ax",%progbits
224 .align 1
225 .p2align 2,,3
226 .global arm_cmplx_dot_prod_q31
227 .syntax unified
228 .thumb
229 .thumb_func
230 .fpu fpv4-sp-d16
232 arm_cmplx_dot_prod_q31:
233 @ args = 4, pretend = 0, frame = 16
234 @ frame_needed = 0, uses_anonymous_args = 0
235 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, r10, fp, lr}
236 0004 85B0 sub sp, sp, #20
237 0006 0393 str r3, [sp, #12]
238 0008 002A cmp r2, #0
239 000a 46D0 beq .L47
ARM GAS /tmp/ccNDh4PL.s page 5
240 000c 031D adds r3, r0, #4
241 000e 4FF0000C mov ip, #0
242 0012 0193 str r3, [sp, #4]
243 0014 0B1D adds r3, r1, #4
244 0016 6446 mov r4, ip
245 0018 E046 mov r8, ip
246 001a 6646 mov r6, ip
247 001c E646 mov lr, ip
248 001e 0293 str r3, [sp, #8]
249 .L46:
250 0020 50F83C90 ldr r9, [r0, ip, lsl #3]
251 0024 51F83C30 ldr r3, [r1, ip, lsl #3]
252 0028 029D ldr r5, [sp, #8]
253 002a 019F ldr r7, [sp, #4]
254 002c 55F83C50 ldr r5, [r5, ip, lsl #3]
255 0030 57F83C70 ldr r7, [r7, ip, lsl #3]
256 0034 89FB03BA smull fp, r10, r9, r3
257 0038 4FEA9B3B lsr fp, fp, #14
258 003c 4BEA8A4B orr fp, fp, r10, lsl #18
259 0040 1BEB0606 adds r6, fp, r6
260 0044 4EEBAA3E adc lr, lr, r10, asr #14
261 0048 89FB059A smull r9, r10, r9, r5
262 004c 4FEA9939 lsr r9, r9, #14
263 0050 49EA8A49 orr r9, r9, r10, lsl #18
264 0054 19EB0404 adds r4, r9, r4
265 0058 85FB0759 smull r5, r9, r5, r7
266 005c 4FEA9535 lsr r5, r5, #14
267 0060 83FB0737 smull r3, r7, r3, r7
268 0064 45EA8945 orr r5, r5, r9, lsl #18
269 0068 4FEA9333 lsr r3, r3, #14
270 006c 48EBAA38 adc r8, r8, r10, asr #14
271 0070 43EA8743 orr r3, r3, r7, lsl #18
272 0074 761B subs r6, r6, r5
273 0076 0CF1010C add ip, ip, #1
274 007a 6EEBA93E sbc lr, lr, r9, asr #14
275 007e 1C19 adds r4, r3, r4
276 0080 48EBA738 adc r8, r8, r7, asr #14
277 0084 6245 cmp r2, ip
278 0086 CBD1 bne .L46
279 .L45:
280 0088 039B ldr r3, [sp, #12]
281 008a C3E9006E strd r6, lr, [r3]
282 008e 0E9B ldr r3, [sp, #56]
283 0090 C3E90048 strd r4, r8, [r3]
284 0094 05B0 add sp, sp, #20
285 @ sp needed
286 0096 BDE8F08F pop {r4, r5, r6, r7, r8, r9, r10, fp, pc}
287 .L47:
288 009a 1446 mov r4, r2
289 009c 9046 mov r8, r2
290 009e 1646 mov r6, r2
291 00a0 9646 mov lr, r2
292 00a2 F1E7 b .L45
294 .section .text.arm_cmplx_mag_f32,"ax",%progbits
295 .align 1
296 .p2align 2,,3
297 .global arm_cmplx_mag_f32
ARM GAS /tmp/ccNDh4PL.s page 6
298 .syntax unified
299 .thumb
300 .thumb_func
301 .fpu fpv4-sp-d16
303 arm_cmplx_mag_f32:
304 @ args = 0, pretend = 0, frame = 16
305 @ frame_needed = 0, uses_anonymous_args = 0
306 0000 1AB3 cbz r2, .L68
307 0002 10B5 push {r4, lr}
308 0004 0830 adds r0, r0, #8
309 0006 84B0 sub sp, sp, #16
310 0008 0024 movs r4, #0
311 .L58:
312 000a 10ED010A vldr.32 s0, [r0, #-4]
313 000e 50ED027A vldr.32 s15, [r0, #-8]
314 0012 20EE000A vmul.f32 s0, s0, s0
315 0016 0431 adds r1, r1, #4
316 0018 A7EEA70A vfma.f32 s0, s15, s15
317 001c B5EEC00A vcmpe.f32 s0, #0
318 0020 F1EE10FA vmrs APSR_nzcv, FPSCR
319 0024 0EDB blt .L65
320 0026 B5EE400A vcmp.f32 s0, #0
321 002a F1EE10FA vmrs APSR_nzcv, FPSCR
322 002e 0DD4 bmi .L66
323 0030 F1EEC07A vsqrt.f32 s15, s0
324 .L56:
325 0034 41ED017A vstr.32 s15, [r1, #-4]
326 .L57:
327 0038 013A subs r2, r2, #1
328 003a 00F10800 add r0, r0, #8
329 003e E4D1 bne .L58
330 0040 04B0 add sp, sp, #16
331 @ sp needed
332 0042 10BD pop {r4, pc}
333 .L65:
334 0044 41F8044C str r4, [r1, #-4] @ float
335 0048 F6E7 b .L57
336 .L68:
337 004a 7047 bx lr
338 .L66:
339 004c CDE90212 strd r1, r2, [sp, #8]
340 0050 0190 str r0, [sp, #4]
341 0052 FFF7FEFF bl sqrtf
342 0056 DDE90212 ldrd r1, r2, [sp, #8]
343 005a 0198 ldr r0, [sp, #4]
344 005c F0EE407A vmov.f32 s15, s0
345 0060 E8E7 b .L56
347 0062 00BF .section .text.arm_cmplx_mag_q15,"ax",%progbits
348 .align 1
349 .p2align 2,,3
350 .global arm_cmplx_mag_q15
351 .syntax unified
352 .thumb
353 .thumb_func
354 .fpu fpv4-sp-d16
356 arm_cmplx_mag_q15:
357 @ args = 0, pretend = 0, frame = 0
ARM GAS /tmp/ccNDh4PL.s page 7
358 @ frame_needed = 0, uses_anonymous_args = 0
359 0000 82B1 cbz r2, .L79
360 0002 70B5 push {r4, r5, r6, lr}
361 0004 0646 mov r6, r0
362 0006 0D46 mov r5, r1
363 0008 1446 mov r4, r2
364 .L73:
365 000a 56F8043B ldr r3, [r6], #4 @ unaligned
366 .syntax unified
367 @ 1977 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
368 000e 23FB03F3 smuad r3, r3, r3
369 @ 0 "" 2
370 .thumb
371 .syntax unified
372 0012 2946 mov r1, r5
373 0014 5814 asrs r0, r3, #17
374 0016 FFF7FEFF bl arm_sqrt_q15
375 001a 013C subs r4, r4, #1
376 001c 05F10205 add r5, r5, #2
377 0020 F3D1 bne .L73
378 0022 70BD pop {r4, r5, r6, pc}
379 .L79:
380 0024 7047 bx lr
382 0026 00BF .section .text.arm_cmplx_mag_q31,"ax",%progbits
383 .align 1
384 .p2align 2,,3
385 .global arm_cmplx_mag_q31
386 .syntax unified
387 .thumb
388 .thumb_func
389 .fpu fpv4-sp-d16
391 arm_cmplx_mag_q31:
392 @ args = 0, pretend = 0, frame = 0
393 @ frame_needed = 0, uses_anonymous_args = 0
394 0000 C2B1 cbz r2, .L90
395 0002 70B5 push {r4, r5, r6, lr}
396 0004 0E46 mov r6, r1
397 0006 1546 mov r5, r2
398 0008 00F10804 add r4, r0, #8
399 .L84:
400 000c 54E90203 ldrd r0, r3, [r4, #-8]
401 0010 83FB033C smull r3, ip, r3, r3
402 0014 80FB0002 smull r0, r2, r0, r0
403 0018 4FEA6C00 asr r0, ip, #1
404 001c 3146 mov r1, r6
405 001e 00EB6200 add r0, r0, r2, asr #1
406 0022 FFF7FEFF bl arm_sqrt_q31
407 0026 013D subs r5, r5, #1
408 0028 06F10406 add r6, r6, #4
409 002c 04F10804 add r4, r4, #8
410 0030 ECD1 bne .L84
411 0032 70BD pop {r4, r5, r6, pc}
412 .L90:
413 0034 7047 bx lr
415 0036 00BF .section .text.arm_cmplx_mag_squared_f32,"ax",%progbits
416 .align 1
417 .p2align 2,,3
ARM GAS /tmp/ccNDh4PL.s page 8
418 .global arm_cmplx_mag_squared_f32
419 .syntax unified
420 .thumb
421 .thumb_func
422 .fpu fpv4-sp-d16
424 arm_cmplx_mag_squared_f32:
425 @ args = 0, pretend = 0, frame = 0
426 @ frame_needed = 0, uses_anonymous_args = 0
427 @ link register save eliminated.
428 0000 72B1 cbz r2, .L93
429 0002 0830 adds r0, r0, #8
430 .L95:
431 0004 50ED017A vldr.32 s15, [r0, #-4]
432 0008 10ED027A vldr.32 s14, [r0, #-8]
433 000c 67EEA77A vmul.f32 s15, s15, s15
434 0010 013A subs r2, r2, #1
435 0012 E7EE077A vfma.f32 s15, s14, s14
436 0016 00F10800 add r0, r0, #8
437 001a E1EC017A vstmia.32 r1!, {s15}
438 001e F1D1 bne .L95
439 .L93:
440 0020 7047 bx lr
442 0022 00BF .section .text.arm_cmplx_mag_squared_q15,"ax",%progbits
443 .align 1
444 .p2align 2,,3
445 .global arm_cmplx_mag_squared_q15
446 .syntax unified
447 .thumb
448 .thumb_func
449 .fpu fpv4-sp-d16
451 arm_cmplx_mag_squared_q15:
452 @ args = 0, pretend = 0, frame = 0
453 @ frame_needed = 0, uses_anonymous_args = 0
454 @ link register save eliminated.
455 0000 42B1 cbz r2, .L100
456 .L102:
457 0002 50F8043B ldr r3, [r0], #4 @ unaligned
458 .syntax unified
459 @ 1977 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
460 0006 23FB03F3 smuad r3, r3, r3
461 @ 0 "" 2
462 .thumb
463 .syntax unified
464 000a 5B14 asrs r3, r3, #17
465 000c 013A subs r2, r2, #1
466 000e 21F8023B strh r3, [r1], #2 @ movhi
467 0012 F6D1 bne .L102
468 .L100:
469 0014 7047 bx lr
471 0016 00BF .section .text.arm_cmplx_mag_squared_q31,"ax",%progbits
472 .align 1
473 .p2align 2,,3
474 .global arm_cmplx_mag_squared_q31
475 .syntax unified
476 .thumb
477 .thumb_func
478 .fpu fpv4-sp-d16
ARM GAS /tmp/ccNDh4PL.s page 9
480 arm_cmplx_mag_squared_q31:
481 @ args = 0, pretend = 0, frame = 0
482 @ frame_needed = 0, uses_anonymous_args = 0
483 0000 9AB1 cbz r2, .L115
484 0002 00B5 push {lr}
485 0004 00F1080E add lr, r0, #8
486 .L109:
487 0008 5EE90203 ldrd r0, r3, [lr, #-8]
488 000c 83FB03C3 smull ip, r3, r3, r3
489 0010 5B10 asrs r3, r3, #1
490 0012 80FB000C smull r0, ip, r0, r0
491 0016 03EB6C03 add r3, r3, ip, asr #1
492 001a 013A subs r2, r2, #1
493 001c 41F8043B str r3, [r1], #4
494 0020 0EF1080E add lr, lr, #8
495 0024 F0D1 bne .L109
496 0026 5DF804FB ldr pc, [sp], #4
497 .L115:
498 002a 7047 bx lr
500 .section .text.arm_cmplx_mult_cmplx_f32,"ax",%progbits
501 .align 1
502 .p2align 2,,3
503 .global arm_cmplx_mult_cmplx_f32
504 .syntax unified
505 .thumb
506 .thumb_func
507 .fpu fpv4-sp-d16
509 arm_cmplx_mult_cmplx_f32:
510 @ args = 0, pretend = 0, frame = 0
511 @ frame_needed = 0, uses_anonymous_args = 0
512 @ link register save eliminated.
513 0000 F3B1 cbz r3, .L118
514 0002 0830 adds r0, r0, #8
515 0004 0831 adds r1, r1, #8
516 0006 0832 adds r2, r2, #8
517 .L120:
518 0008 50ED017A vldr.32 s15, [r0, #-4]
519 000c 51ED025A vldr.32 s11, [r1, #-8]
520 0010 51ED016A vldr.32 s13, [r1, #-4]
521 0014 10ED026A vldr.32 s12, [r0, #-8]
522 0018 26EEE77A vnmul.f32 s14, s13, s15
523 001c 67EEA57A vmul.f32 s15, s15, s11
524 0020 A6EE257A vfma.f32 s14, s12, s11
525 0024 013B subs r3, r3, #1
526 0026 00F10800 add r0, r0, #8
527 002a E6EE267A vfma.f32 s15, s12, s13
528 002e 01F10801 add r1, r1, #8
529 0032 02F10802 add r2, r2, #8
530 0036 02ED047A vstr.32 s14, [r2, #-16]
531 003a 42ED037A vstr.32 s15, [r2, #-12]
532 003e E3D1 bne .L120
533 .L118:
534 0040 7047 bx lr
536 0042 00BF .section .text.arm_cmplx_mult_cmplx_q15,"ax",%progbits
537 .align 1
538 .p2align 2,,3
539 .global arm_cmplx_mult_cmplx_q15
ARM GAS /tmp/ccNDh4PL.s page 10
540 .syntax unified
541 .thumb
542 .thumb_func
543 .fpu fpv4-sp-d16
545 arm_cmplx_mult_cmplx_q15:
546 @ args = 0, pretend = 0, frame = 0
547 @ frame_needed = 0, uses_anonymous_args = 0
548 0000 3BB3 cbz r3, .L133
549 0002 2DE9F047 push {r4, r5, r6, r7, r8, r9, r10, lr}
550 0006 4FF0000C mov ip, #0
551 000a 871C adds r7, r0, #2
552 000c 8E1C adds r6, r1, #2
553 000e 951C adds r5, r2, #2
554 .L127:
555 0010 37F92CE0 ldrsh lr, [r7, ip, lsl #2]
556 0014 31F92C40 ldrsh r4, [r1, ip, lsl #2]
557 0018 36F92C80 ldrsh r8, [r6, ip, lsl #2]
558 001c 30F92CA0 ldrsh r10, [r0, ip, lsl #2]
559 0020 0AFB04F9 mul r9, r10, r4
560 0024 04FB0EF4 mul r4, r4, lr
561 0028 0EFB08FE mul lr, lr, r8
562 002c 4FEA6E4E asr lr, lr, #17
563 0030 0AFB08F8 mul r8, r10, r8
564 0034 6414 asrs r4, r4, #17
565 0036 CEEB694E rsb lr, lr, r9, asr #17
566 003a 04EB6844 add r4, r4, r8, asr #17
567 003e 22F82CE0 strh lr, [r2, ip, lsl #2] @ movhi
568 0042 25F82C40 strh r4, [r5, ip, lsl #2] @ movhi
569 0046 0CF1010C add ip, ip, #1
570 004a 6345 cmp r3, ip
571 004c E0D1 bne .L127
572 004e BDE8F087 pop {r4, r5, r6, r7, r8, r9, r10, pc}
573 .L133:
574 0052 7047 bx lr
576 .section .text.arm_cmplx_mult_cmplx_q31,"ax",%progbits
577 .align 1
578 .p2align 2,,3
579 .global arm_cmplx_mult_cmplx_q31
580 .syntax unified
581 .thumb
582 .thumb_func
583 .fpu fpv4-sp-d16
585 arm_cmplx_mult_cmplx_q31:
586 @ args = 0, pretend = 0, frame = 0
587 @ frame_needed = 0, uses_anonymous_args = 0
588 0000 3BB3 cbz r3, .L144
589 0002 2DE9F04F push {r4, r5, r6, r7, r8, r9, r10, fp, lr}
590 0006 4FF0000C mov ip, #0
591 000a 00F10408 add r8, r0, #4
592 000e 0F1D adds r7, r1, #4
593 0010 161D adds r6, r2, #4
594 .L138:
595 0012 58F83C50 ldr r5, [r8, ip, lsl #3]
596 0016 51F83C40 ldr r4, [r1, ip, lsl #3]
597 001a 57F83CA0 ldr r10, [r7, ip, lsl #3]
598 001e 50F83CE0 ldr lr, [r0, ip, lsl #3]
599 0022 8EFB04B9 smull fp, r9, lr, r4
ARM GAS /tmp/ccNDh4PL.s page 11
600 0026 84FB05B4 smull fp, r4, r4, r5
601 002a 85FB0AB5 smull fp, r5, r5, r10
602 002e 6D10 asrs r5, r5, #1
603 0030 8EFB0AAE smull r10, lr, lr, r10
604 0034 6410 asrs r4, r4, #1
605 0036 C5EB6905 rsb r5, r5, r9, asr #1
606 003a 04EB6E04 add r4, r4, lr, asr #1
607 003e 42F83C50 str r5, [r2, ip, lsl #3]
608 0042 46F83C40 str r4, [r6, ip, lsl #3]
609 0046 0CF1010C add ip, ip, #1
610 004a 6345 cmp r3, ip
611 004c E1D1 bne .L138
612 004e BDE8F08F pop {r4, r5, r6, r7, r8, r9, r10, fp, pc}
613 .L144:
614 0052 7047 bx lr
616 .section .text.arm_cmplx_mult_real_f32,"ax",%progbits
617 .align 1
618 .p2align 2,,3
619 .global arm_cmplx_mult_real_f32
620 .syntax unified
621 .thumb
622 .thumb_func
623 .fpu fpv4-sp-d16
625 arm_cmplx_mult_real_f32:
626 @ args = 0, pretend = 0, frame = 0
627 @ frame_needed = 0, uses_anonymous_args = 0
628 @ link register save eliminated.
629 0000 A3B1 cbz r3, .L147
630 0002 0830 adds r0, r0, #8
631 0004 0832 adds r2, r2, #8
632 .L149:
633 0006 10ED027A vldr.32 s14, [r0, #-8]
634 000a F1EC016A vldmia.32 r1!, {s13}
635 000e 27EE267A vmul.f32 s14, s14, s13
636 0012 0830 adds r0, r0, #8
637 0014 02ED027A vstr.32 s14, [r2, #-8]
638 0018 50ED037A vldr.32 s15, [r0, #-12]
639 001c 67EEA67A vmul.f32 s15, s15, s13
640 0020 013B subs r3, r3, #1
641 0022 02F10802 add r2, r2, #8
642 0026 42ED037A vstr.32 s15, [r2, #-12]
643 002a ECD1 bne .L149
644 .L147:
645 002c 7047 bx lr
647 002e 00BF .section .text.arm_cmplx_mult_real_q15,"ax",%progbits
648 .align 1
649 .p2align 2,,3
650 .global arm_cmplx_mult_real_q15
651 .syntax unified
652 .thumb
653 .thumb_func
654 .fpu fpv4-sp-d16
656 arm_cmplx_mult_real_q15:
657 @ args = 0, pretend = 0, frame = 0
658 @ frame_needed = 0, uses_anonymous_args = 0
659 0000 EBB1 cbz r3, .L162
660 0002 F0B5 push {r4, r5, r6, r7, lr}
ARM GAS /tmp/ccNDh4PL.s page 12
661 0004 0024 movs r4, #0
662 0006 861C adds r6, r0, #2
663 0008 951C adds r5, r2, #2
664 .L156:
665 000a 31F9027B ldrsh r7, [r1], #2
666 000e 30F824E0 ldrh lr, [r0, r4, lsl #2]
667 0012 1EFB07FE smulbb lr, lr, r7
668 0016 4FEAEE3E asr lr, lr, #15
669 .syntax unified
670 @ 226 "Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_
671 001a 0EF30F0E ssat lr, #16, lr
672 @ 0 "" 2
673 .thumb
674 .syntax unified
675 001e 22F824E0 strh lr, [r2, r4, lsl #2] @ movhi
676 0022 36F824C0 ldrh ip, [r6, r4, lsl #2]
677 0026 1CFB07FC smulbb ip, ip, r7
678 002a 4FEAEC3C asr ip, ip, #15
679 .syntax unified
680 @ 227 "Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_
681 002e 0CF30F0C ssat ip, #16, ip
682 @ 0 "" 2
683 .thumb
684 .syntax unified
685 0032 25F824C0 strh ip, [r5, r4, lsl #2] @ movhi
686 0036 0134 adds r4, r4, #1
687 0038 A342 cmp r3, r4
688 003a E6D1 bne .L156
689 003c F0BD pop {r4, r5, r6, r7, pc}
690 .L162:
691 003e 7047 bx lr
693 .section .text.arm_cmplx_mult_real_q31,"ax",%progbits
694 .align 1
695 .p2align 2,,3
696 .global arm_cmplx_mult_real_q31
697 .syntax unified
698 .thumb
699 .thumb_func
700 .fpu fpv4-sp-d16
702 arm_cmplx_mult_real_q31:
703 @ args = 0, pretend = 0, frame = 0
704 @ frame_needed = 0, uses_anonymous_args = 0
705 0000 EBB1 cbz r3, .L173
706 0002 F0B5 push {r4, r5, r6, r7, lr}
707 0004 4FF0000C mov ip, #0
708 0008 061D adds r6, r0, #4
709 000a 151D adds r5, r2, #4
710 .L167:
711 000c 51F8044B ldr r4, [r1], #4
712 0010 50F83C70 ldr r7, [r0, ip, lsl #3]
713 0014 84FB07E7 smull lr, r7, r4, r7
714 .syntax unified
715 @ 187 "Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_
716 0018 07F31E07 ssat r7, #31, r7
717 @ 0 "" 2
718 .thumb
719 .syntax unified
ARM GAS /tmp/ccNDh4PL.s page 13
720 001c 7F00 lsls r7, r7, #1
721 001e 42F83C70 str r7, [r2, ip, lsl #3]
722 0022 56F83C70 ldr r7, [r6, ip, lsl #3]
723 0026 84FB07E4 smull lr, r4, r4, r7
724 .syntax unified
725 @ 188 "Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ComplexMathFunctions/arm_cmplx_mult_real_
726 002a 04F31E04 ssat r4, #31, r4
727 @ 0 "" 2
728 .thumb
729 .syntax unified
730 002e 6400 lsls r4, r4, #1
731 0030 45F83C40 str r4, [r5, ip, lsl #3]
732 0034 0CF1010C add ip, ip, #1
733 0038 6345 cmp r3, ip
734 003a E7D1 bne .L167
735 003c F0BD pop {r4, r5, r6, r7, pc}
736 .L173:
737 003e 7047 bx lr
739 .ident "GCC: (15:10.3-2021.07-4) 10.3.1 20210621 (release)"
ARM GAS /tmp/ccNDh4PL.s page 14
DEFINED SYMBOLS
*ABS*:0000000000000000 ComplexMathFunctions.c
/tmp/ccNDh4PL.s:16 .text.arm_cmplx_conj_f32:0000000000000000 $t
/tmp/ccNDh4PL.s:25 .text.arm_cmplx_conj_f32:0000000000000000 arm_cmplx_conj_f32
/tmp/ccNDh4PL.s:46 .text.arm_cmplx_conj_q15:0000000000000000 $t
/tmp/ccNDh4PL.s:54 .text.arm_cmplx_conj_q15:0000000000000000 arm_cmplx_conj_q15
/tmp/ccNDh4PL.s:82 .text.arm_cmplx_conj_q31:0000000000000000 $t
/tmp/ccNDh4PL.s:90 .text.arm_cmplx_conj_q31:0000000000000000 arm_cmplx_conj_q31
/tmp/ccNDh4PL.s:118 .text.arm_cmplx_dot_prod_f32:0000000000000000 $t
/tmp/ccNDh4PL.s:126 .text.arm_cmplx_dot_prod_f32:0000000000000000 arm_cmplx_dot_prod_f32
/tmp/ccNDh4PL.s:161 .text.arm_cmplx_dot_prod_f32:0000000000000058 $d
/tmp/ccNDh4PL.s:164 .text.arm_cmplx_dot_prod_q15:0000000000000000 $t
/tmp/ccNDh4PL.s:172 .text.arm_cmplx_dot_prod_q15:0000000000000000 arm_cmplx_dot_prod_q15
/tmp/ccNDh4PL.s:224 .text.arm_cmplx_dot_prod_q31:0000000000000000 $t
/tmp/ccNDh4PL.s:232 .text.arm_cmplx_dot_prod_q31:0000000000000000 arm_cmplx_dot_prod_q31
/tmp/ccNDh4PL.s:295 .text.arm_cmplx_mag_f32:0000000000000000 $t
/tmp/ccNDh4PL.s:303 .text.arm_cmplx_mag_f32:0000000000000000 arm_cmplx_mag_f32
/tmp/ccNDh4PL.s:348 .text.arm_cmplx_mag_q15:0000000000000000 $t
/tmp/ccNDh4PL.s:356 .text.arm_cmplx_mag_q15:0000000000000000 arm_cmplx_mag_q15
/tmp/ccNDh4PL.s:383 .text.arm_cmplx_mag_q31:0000000000000000 $t
/tmp/ccNDh4PL.s:391 .text.arm_cmplx_mag_q31:0000000000000000 arm_cmplx_mag_q31
/tmp/ccNDh4PL.s:416 .text.arm_cmplx_mag_squared_f32:0000000000000000 $t
/tmp/ccNDh4PL.s:424 .text.arm_cmplx_mag_squared_f32:0000000000000000 arm_cmplx_mag_squared_f32
/tmp/ccNDh4PL.s:443 .text.arm_cmplx_mag_squared_q15:0000000000000000 $t
/tmp/ccNDh4PL.s:451 .text.arm_cmplx_mag_squared_q15:0000000000000000 arm_cmplx_mag_squared_q15
/tmp/ccNDh4PL.s:472 .text.arm_cmplx_mag_squared_q31:0000000000000000 $t
/tmp/ccNDh4PL.s:480 .text.arm_cmplx_mag_squared_q31:0000000000000000 arm_cmplx_mag_squared_q31
/tmp/ccNDh4PL.s:501 .text.arm_cmplx_mult_cmplx_f32:0000000000000000 $t
/tmp/ccNDh4PL.s:509 .text.arm_cmplx_mult_cmplx_f32:0000000000000000 arm_cmplx_mult_cmplx_f32
/tmp/ccNDh4PL.s:537 .text.arm_cmplx_mult_cmplx_q15:0000000000000000 $t
/tmp/ccNDh4PL.s:545 .text.arm_cmplx_mult_cmplx_q15:0000000000000000 arm_cmplx_mult_cmplx_q15
/tmp/ccNDh4PL.s:577 .text.arm_cmplx_mult_cmplx_q31:0000000000000000 $t
/tmp/ccNDh4PL.s:585 .text.arm_cmplx_mult_cmplx_q31:0000000000000000 arm_cmplx_mult_cmplx_q31
/tmp/ccNDh4PL.s:617 .text.arm_cmplx_mult_real_f32:0000000000000000 $t
/tmp/ccNDh4PL.s:625 .text.arm_cmplx_mult_real_f32:0000000000000000 arm_cmplx_mult_real_f32
/tmp/ccNDh4PL.s:648 .text.arm_cmplx_mult_real_q15:0000000000000000 $t
/tmp/ccNDh4PL.s:656 .text.arm_cmplx_mult_real_q15:0000000000000000 arm_cmplx_mult_real_q15
/tmp/ccNDh4PL.s:694 .text.arm_cmplx_mult_real_q31:0000000000000000 $t
/tmp/ccNDh4PL.s:702 .text.arm_cmplx_mult_real_q31:0000000000000000 arm_cmplx_mult_real_q31
UNDEFINED SYMBOLS
sqrtf
arm_sqrt_q15
arm_sqrt_q31

Binary file not shown.

View File

@@ -1,27 +0,0 @@
build/ControllerFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_sin_cos_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_sin_cos_q31.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_pid_reset_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_sin_cos_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/ControllerFunctions/arm_sin_cos_q31.c:

View File

@@ -1,464 +0,0 @@
ARM GAS /tmp/ccp28G4X.s page 1
1 .cpu cortex-m4
2 .eabi_attribute 27, 1
3 .eabi_attribute 28, 1
4 .eabi_attribute 20, 1
5 .eabi_attribute 21, 1
6 .eabi_attribute 23, 3
7 .eabi_attribute 24, 1
8 .eabi_attribute 25, 1
9 .eabi_attribute 26, 1
10 .eabi_attribute 30, 2
11 .eabi_attribute 34, 1
12 .eabi_attribute 18, 4
13 .file "ControllerFunctions.c"
14 .text
15 .section .text.arm_pid_init_f32,"ax",%progbits
16 .align 1
17 .p2align 2,,3
18 .global arm_pid_init_f32
19 .arch armv7e-m
20 .syntax unified
21 .thumb
22 .thumb_func
23 .fpu fpv4-sp-d16
25 arm_pid_init_f32:
26 @ args = 0, pretend = 0, frame = 0
27 @ frame_needed = 0, uses_anonymous_args = 0
28 @ link register save eliminated.
29 0000 D0ED067A vldr.32 s15, [r0, #24]
30 0004 90ED087A vldr.32 s14, [r0, #32]
31 0008 90ED076A vldr.32 s12, [r0, #28]
32 000c 80ED027A vstr.32 s14, [r0, #8]
33 0010 F0EE676A vmov.f32 s13, s15
34 0014 F0EE005A vmov.f32 s11, #2.0e+0
35 0018 D7EE656A vfnma.f32 s13, s14, s11
36 001c 77EE867A vadd.f32 s15, s15, s12
37 0020 C0ED016A vstr.32 s13, [r0, #4]
38 0024 77EE877A vadd.f32 s15, s15, s14
39 0028 C0ED007A vstr.32 s15, [r0]
40 002c 01B9 cbnz r1, .L7
41 002e 7047 bx lr
42 .L7:
43 0030 0023 movs r3, #0
44 0032 C360 str r3, [r0, #12] @ unaligned
45 0034 0361 str r3, [r0, #16] @ unaligned
46 0036 4361 str r3, [r0, #20] @ unaligned
47 0038 7047 bx lr
49 003a 00BF .section .text.arm_pid_init_q15,"ax",%progbits
50 .align 1
51 .p2align 2,,3
52 .global arm_pid_init_q15
53 .syntax unified
54 .thumb
55 .thumb_func
56 .fpu fpv4-sp-d16
58 arm_pid_init_q15:
59 @ args = 0, pretend = 0, frame = 0
60 @ frame_needed = 0, uses_anonymous_args = 0
ARM GAS /tmp/ccp28G4X.s page 2
61 0000 00B5 push {lr}
62 0002 B0F91020 ldrsh r2, [r0, #16]
63 0006 B0F90EE0 ldrsh lr, [r0, #14]
64 .syntax unified
65 @ 1731 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
66 000a 9EFA12F2 qadd16 r2, lr, r2
67 @ 0 "" 2
68 .thumb
69 .syntax unified
70 000e B0F912C0 ldrsh ip, [r0, #18]
71 .syntax unified
72 @ 1731 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
73 0012 92FA1CF2 qadd16 r2, r2, ip
74 @ 0 "" 2
75 .thumb
76 .syntax unified
77 0016 0280 strh r2, [r0] @ movhi
78 .syntax unified
79 @ 1731 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
80 0018 9CFA1CF3 qadd16 r3, ip, ip
81 @ 0 "" 2
82 @ 1731 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
83 001c 93FA1EF3 qadd16 r3, r3, lr
84 @ 0 "" 2
85 .thumb
86 .syntax unified
87 0020 5B42 rsbs r3, r3, #0
88 0022 9BB2 uxth r3, r3
89 0024 43EA0C43 orr r3, r3, ip, lsl #16
90 0028 4360 str r3, [r0, #4]
91 002a 09B9 cbnz r1, .L14
92 002c 5DF804FB ldr pc, [sp], #4
93 .L14:
94 0030 0023 movs r3, #0
95 0032 8360 str r3, [r0, #8] @ unaligned
96 0034 8381 strh r3, [r0, #12] @ unaligned
97 0036 5DF804FB ldr pc, [sp], #4
99 003a 00BF .section .text.arm_pid_init_q31,"ax",%progbits
100 .align 1
101 .p2align 2,,3
102 .global arm_pid_init_q31
103 .syntax unified
104 .thumb
105 .thumb_func
106 .fpu fpv4-sp-d16
108 arm_pid_init_q31:
109 @ args = 0, pretend = 0, frame = 0
110 @ frame_needed = 0, uses_anonymous_args = 0
111 @ link register save eliminated.
112 0000 30B4 push {r4, r5}
113 0002 D0E90652 ldrd r5, r2, [r0, #24]
114 .syntax unified
115 @ 2117 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
116 0006 82FA85F2 qadd r2, r5, r2
117 @ 0 "" 2
118 .thumb
119 .syntax unified
ARM GAS /tmp/ccp28G4X.s page 3
120 000a 046A ldr r4, [r0, #32]
121 .syntax unified
122 @ 2117 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
123 000c 84FA82F2 qadd r2, r2, r4
124 @ 0 "" 2
125 .thumb
126 .syntax unified
127 0010 0260 str r2, [r0]
128 .syntax unified
129 @ 2117 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
130 0012 84FA84F3 qadd r3, r4, r4
131 @ 0 "" 2
132 @ 2117 "Drivers/CMSIS/Include/cmsis_gcc.h" 1
133 0016 85FA83F3 qadd r3, r3, r5
134 @ 0 "" 2
135 .thumb
136 .syntax unified
137 001a 5B42 rsbs r3, r3, #0
138 001c C0E90134 strd r3, r4, [r0, #4]
139 0020 09B9 cbnz r1, .L21
140 0022 30BC pop {r4, r5}
141 0024 7047 bx lr
142 .L21:
143 0026 0023 movs r3, #0
144 0028 30BC pop {r4, r5}
145 002a C360 str r3, [r0, #12] @ unaligned
146 002c 0361 str r3, [r0, #16] @ unaligned
147 002e 4361 str r3, [r0, #20] @ unaligned
148 0030 7047 bx lr
150 0032 00BF .section .text.arm_pid_reset_f32,"ax",%progbits
151 .align 1
152 .p2align 2,,3
153 .global arm_pid_reset_f32
154 .syntax unified
155 .thumb
156 .thumb_func
157 .fpu fpv4-sp-d16
159 arm_pid_reset_f32:
160 @ args = 0, pretend = 0, frame = 0
161 @ frame_needed = 0, uses_anonymous_args = 0
162 @ link register save eliminated.
163 0000 0023 movs r3, #0
164 0002 C360 str r3, [r0, #12] @ unaligned
165 0004 0361 str r3, [r0, #16] @ unaligned
166 0006 4361 str r3, [r0, #20] @ unaligned
167 0008 7047 bx lr
169 000a 00BF .section .text.arm_pid_reset_q15,"ax",%progbits
170 .align 1
171 .p2align 2,,3
172 .global arm_pid_reset_q15
173 .syntax unified
174 .thumb
175 .thumb_func
176 .fpu fpv4-sp-d16
178 arm_pid_reset_q15:
179 @ args = 0, pretend = 0, frame = 0
180 @ frame_needed = 0, uses_anonymous_args = 0
ARM GAS /tmp/ccp28G4X.s page 4
181 @ link register save eliminated.
182 0000 0023 movs r3, #0
183 0002 8360 str r3, [r0, #8] @ unaligned
184 0004 8381 strh r3, [r0, #12] @ unaligned
185 0006 7047 bx lr
187 .section .text.arm_pid_reset_q31,"ax",%progbits
188 .align 1
189 .p2align 2,,3
190 .global arm_pid_reset_q31
191 .syntax unified
192 .thumb
193 .thumb_func
194 .fpu fpv4-sp-d16
196 arm_pid_reset_q31:
197 @ args = 0, pretend = 0, frame = 0
198 @ frame_needed = 0, uses_anonymous_args = 0
199 @ link register save eliminated.
200 0000 0023 movs r3, #0
201 0002 C360 str r3, [r0, #12] @ unaligned
202 0004 0361 str r3, [r0, #16] @ unaligned
203 0006 4361 str r3, [r0, #20] @ unaligned
204 0008 7047 bx lr
206 000a 00BF .section .text.arm_sin_cos_f32,"ax",%progbits
207 .align 1
208 .p2align 2,,3
209 .global arm_sin_cos_f32
210 .syntax unified
211 .thumb
212 .thumb_func
213 .fpu fpv4-sp-d16
215 arm_sin_cos_f32:
216 @ args = 0, pretend = 0, frame = 0
217 @ frame_needed = 0, uses_anonymous_args = 0
218 0000 9FED3B7A vldr.32 s14, .L33
219 0004 DFED3B6A vldr.32 s13, .L33+4
220 0008 3B4A ldr r2, .L33+8
221 000a 20EE077A vmul.f32 s14, s0, s14
222 000e 00B5 push {lr}
223 0010 B5EEC07A vcmpe.f32 s14, #0
224 0014 F1EE10FA vmrs APSR_nzcv, FPSCR
225 0018 48BF it mi
226 001a B1EE477A vnegmi.f32 s14, s14
227 001e FDEEC77A vcvt.s32.f32 s15, s14
228 0022 F0EE002A vmov.f32 s5, #2.0e+0
229 0026 F8EEE77A vcvt.f32.s32 s15, s15
230 002a F0EE081A vmov.f32 s3, #3.0e+0
231 002e 77EE677A vsub.f32 s15, s14, s15
232 0032 9FED327A vldr.32 s14, .L33+12
233 0036 67EEA67A vmul.f32 s15, s15, s13
234 003a B5EEC00A vcmpe.f32 s0, #0
235 003e FCEEE76A vcvt.u32.f32 s13, s15
236 0042 F1EE10FA vmrs APSR_nzcv, FPSCR
237 0046 16EE903A vmov r3, s13 @ int
238 004a C3F30803 ubfx r3, r3, #0, #9
239 004e 06EE903A vmov s13, r3 @ int
240 0052 02EB830E add lr, r2, r3, lsl #2
241 0056 03F1800C add ip, r3, #128
ARM GAS /tmp/ccp28G4X.s page 5
242 005a 9EED004A vldr.32 s8, [lr]
243 005e DEED014A vldr.32 s9, [lr, #4]
244 0062 F8EE666A vcvt.f32.u32 s13, s13
245 0066 CCF3080C ubfx ip, ip, #0, #9
246 006a 02EB8C03 add r3, r2, ip, lsl #2
247 006e 77EEE67A vsub.f32 s15, s15, s13
248 0072 D3ED013A vldr.32 s7, [r3, #4]
249 0076 F1EE446A vneg.f32 s13, s8
250 007a B0EE645A vmov.f32 s10, s9
251 007e 96EEA25A vfnms.f32 s10, s13, s5
252 0082 36EEE41A vsub.f32 s2, s13, s9
253 0086 66EE875A vmul.f32 s11, s13, s14
254 008a D3ED006A vldr.32 s13, [r3]
255 008e B0EE636A vmov.f32 s12, s7
256 0092 A6EEA26A vfma.f32 s12, s13, s5
257 0096 74EEC44A vsub.f32 s9, s9, s8
258 009a 33EEE62A vsub.f32 s4, s7, s13
259 009e 27EE466A vnmul.f32 s12, s14, s12
260 00a2 76EEA33A vadd.f32 s7, s13, s7
261 00a6 34EEA43A vadd.f32 s6, s9, s9
262 00aa 27EE455A vnmul.f32 s10, s14, s10
263 00ae 72EE022A vadd.f32 s5, s4, s4
264 00b2 93EE873A vfnms.f32 s6, s7, s14
265 00b6 A4EEA16A vfma.f32 s12, s9, s3
266 00ba D1EE072A vfnms.f32 s5, s2, s14
267 00be A2EE215A vfma.f32 s10, s4, s3
268 00c2 A7EE836A vfma.f32 s12, s15, s6
269 00c6 A7EEA25A vfma.f32 s10, s15, s5
270 00ca 26EE877A vmul.f32 s14, s13, s14
271 00ce E7EE855A vfma.f32 s11, s15, s10
272 00d2 A7EE867A vfma.f32 s14, s15, s12
273 00d6 E7EEA56A vfma.f32 s13, s15, s11
274 00da A7EE874A vfma.f32 s8, s15, s14
275 00de C1ED006A vstr.32 s13, [r1]
276 00e2 48BF it mi
277 00e4 B1EE444A vnegmi.f32 s8, s8
278 00e8 80ED004A vstr.32 s8, [r0]
279 00ec 5DF804FB ldr pc, [sp], #4
280 .L34:
281 .align 2
282 .L33:
283 00f0 610B363B .word 993397601
284 00f4 00000044 .word 1140850688
285 00f8 00000000 .word sinTable_f32
286 00fc DB0F493C .word 1011421147
288 .section .text.arm_sin_cos_q31,"ax",%progbits
289 .align 1
290 .p2align 2,,3
291 .global arm_sin_cos_q31
292 .syntax unified
293 .thumb
294 .thumb_func
295 .fpu fpv4-sp-d16
297 arm_sin_cos_q31:
298 @ args = 0, pretend = 0, frame = 8
299 @ frame_needed = 0, uses_anonymous_args = 0
300 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, r10, fp, lr}
ARM GAS /tmp/ccp28G4X.s page 6
301 0004 C30D lsrs r3, r0, #23
302 0006 83B0 sub sp, sp, #12
303 0008 CDE90012 strd r1, r2, [sp]
304 000c 654A ldr r2, .L39
305 000e 664F ldr r7, .L39+4
306 0010 52F82350 ldr r5, [r2, r3, lsl #2]
307 0014 DFF894B1 ldr fp, .L39+8
308 0018 591C adds r1, r3, #1
309 001a 03F18004 add r4, r3, #128
310 001e C4F30804 ubfx r4, r4, #0, #9
311 0022 52F82130 ldr r3, [r2, r1, lsl #2]
312 0026 52F82410 ldr r1, [r2, r4, lsl #2]
313 002a 661C adds r6, r4, #1
314 002c C5F1000E rsb lr, r5, #0
315 0030 C3F10009 rsb r9, r3, #0
316 0034 52F82680 ldr r8, [r2, r6, lsl #2]
317 0038 4FEAE97A asr r10, r9, #31
318 003c 1EEB0902 adds r2, lr, r9
319 0040 4AEBEE76 adc r6, r10, lr, asr #31
320 0044 A2FB0724 umull r2, r4, r2, r7
321 0048 0BEA0020 and r0, fp, r0, lsl #8
322 004c 07FB0644 mla r4, r7, r6, r4
323 0050 4FEAEE7B asr fp, lr, #31
324 0054 1EEB0E06 adds r6, lr, lr
325 0058 4BEB0B0B adc fp, fp, fp
326 005c 16EB0906 adds r6, r6, r9
327 0060 A8EB010C sub ip, r8, r1
328 0064 4AEB0B0B adc fp, r10, fp
329 0068 4FF0030A mov r10, #3
330 006c A4EB0C04 sub r4, r4, ip
331 0070 8CFB0ACA smull ip, r10, ip, r10
332 0074 4FEACA7A lsl r10, r10, #31
333 0078 A6FB0769 umull r6, r9, r6, r7
334 007c 4AEA5C0A orr r10, r10, ip, lsr #1
335 0080 D20F lsrs r2, r2, #31
336 0082 4FEACC7C lsl ip, ip, #31
337 0086 07FB0B9B mla fp, r7, fp, r9
338 008a 42EA4402 orr r2, r2, r4, lsl #1
339 008e BCEB060C subs ip, ip, r6
340 0092 6AEB0B0A sbc r10, r10, fp
341 0096 E417 asrs r4, r4, #31
342 0098 A0FB026B umull r6, fp, r0, r2
343 009c 1CEB060C adds ip, ip, r6
344 00a0 00FB04B4 mla r4, r0, r4, fp
345 00a4 44EB0A0A adc r10, r4, r10
346 00a8 4FEADC76 lsr r6, ip, #31
347 00ac 46EA4A06 orr r6, r6, r10, lsl #1
348 00b0 A0FB0626 umull r2, r6, r0, r6
349 00b4 4FEAEA7A asr r10, r10, #31
350 00b8 00FB0A66 mla r6, r0, r10, r6
351 00bc CEFB0726 smlal r2, r6, lr, r7
352 00c0 D20F lsrs r2, r2, #31
353 00c2 42EA4602 orr r2, r2, r6, lsl #1
354 00c6 A0FB0224 umull r2, r4, r0, r2
355 00ca F617 asrs r6, r6, #31
356 00cc 00FB0644 mla r4, r0, r6, r4
357 00d0 D20F lsrs r2, r2, #31
ARM GAS /tmp/ccp28G4X.s page 7
358 00d2 42EA4402 orr r2, r2, r4, lsl #1
359 00d6 5218 adds r2, r2, r1
360 00d8 4FEAE474 asr r4, r4, #31
361 00dc 44EBE174 adc r4, r4, r1, asr #31
362 00e0 B4EBE27F cmp r4, r2, asr #31
363 00e4 1CBF itt ne
364 00e6 6FF00042 mvnne r2, #-2147483648
365 00ea 82EAE472 eorne r2, r2, r4, asr #31
366 00ee 019C ldr r4, [sp, #4]
367 00f0 2260 str r2, [r4]
368 00f2 2D4A ldr r2, .L39+4
369 00f4 11EB0807 adds r7, r1, r8
370 00f8 4FEAE176 asr r6, r1, #31
371 00fc 46EBE87C adc ip, r6, r8, asr #31
372 0100 A7FB0247 umull r4, r7, r7, r2
373 0104 02FB0C77 mla r7, r2, ip, r7
374 0108 11EB010C adds ip, r1, r1
375 010c 7641 adcs r6, r6, r6
376 010e 1CEB080C adds ip, ip, r8
377 0112 A3EB0503 sub r3, r3, r5
378 0116 46EBE878 adc r8, r6, r8, asr #31
379 011a 0326 movs r6, #3
380 011c FF1A subs r7, r7, r3
381 011e 83FB0636 smull r3, r6, r3, r6
382 0122 E40F lsrs r4, r4, #31
383 0124 F607 lsls r6, r6, #31
384 0126 ACFB02CE umull ip, lr, ip, r2
385 012a 44EA4704 orr r4, r4, r7, lsl #1
386 012e 46EA5306 orr r6, r6, r3, lsr #1
387 0132 DB07 lsls r3, r3, #31
388 0134 B3EB0C03 subs r3, r3, ip
389 0138 02FB08E8 mla r8, r2, r8, lr
390 013c A0FB04C4 umull ip, r4, r0, r4
391 0140 4FEAE777 asr r7, r7, #31
392 0144 00FB0747 mla r7, r0, r7, r4
393 0148 66EB0806 sbc r6, r6, r8
394 014c 13EB0C03 adds r3, r3, ip
395 0150 47EB0606 adc r6, r7, r6
396 0154 DB0F lsrs r3, r3, #31
397 0156 43EA4603 orr r3, r3, r6, lsl #1
398 015a F717 asrs r7, r6, #31
399 015c A0FB0336 umull r3, r6, r0, r3
400 0160 00FB0766 mla r6, r0, r7, r6
401 0164 C1FB0236 smlal r3, r6, r1, r2
402 0168 DB0F lsrs r3, r3, #31
403 016a 43EA4603 orr r3, r3, r6, lsl #1
404 016e A0FB0332 umull r3, r2, r0, r3
405 0172 F617 asrs r6, r6, #31
406 0174 00FB0620 mla r0, r0, r6, r2
407 0178 DB0F lsrs r3, r3, #31
408 017a 43EA4003 orr r3, r3, r0, lsl #1
409 017e 5B19 adds r3, r3, r5
410 0180 4FEAE575 asr r5, r5, #31
411 0184 45EBE070 adc r0, r5, r0, asr #31
412 0188 B0EBE37F cmp r0, r3, asr #31
413 018c 18BF it ne
414 018e 6FF00043 mvnne r3, #-2147483648
ARM GAS /tmp/ccp28G4X.s page 8
415 0192 009A ldr r2, [sp]
416 0194 18BF it ne
417 0196 83EAE073 eorne r3, r3, r0, asr #31
418 019a 1360 str r3, [r2]
419 019c 03B0 add sp, sp, #12
420 @ sp needed
421 019e BDE8F08F pop {r4, r5, r6, r7, r8, r9, r10, fp, pc}
422 .L40:
423 01a2 00BF .align 2
424 .L39:
425 01a4 00000000 .word sinTable_q31
426 01a8 B51F9201 .word 26353589
427 01ac 00FFFF7F .word 2147483392
429 .ident "GCC: (15:10.3-2021.07-4) 10.3.1 20210621 (release)"
ARM GAS /tmp/ccp28G4X.s page 9
DEFINED SYMBOLS
*ABS*:0000000000000000 ControllerFunctions.c
/tmp/ccp28G4X.s:16 .text.arm_pid_init_f32:0000000000000000 $t
/tmp/ccp28G4X.s:25 .text.arm_pid_init_f32:0000000000000000 arm_pid_init_f32
/tmp/ccp28G4X.s:50 .text.arm_pid_init_q15:0000000000000000 $t
/tmp/ccp28G4X.s:58 .text.arm_pid_init_q15:0000000000000000 arm_pid_init_q15
/tmp/ccp28G4X.s:100 .text.arm_pid_init_q31:0000000000000000 $t
/tmp/ccp28G4X.s:108 .text.arm_pid_init_q31:0000000000000000 arm_pid_init_q31
/tmp/ccp28G4X.s:151 .text.arm_pid_reset_f32:0000000000000000 $t
/tmp/ccp28G4X.s:159 .text.arm_pid_reset_f32:0000000000000000 arm_pid_reset_f32
/tmp/ccp28G4X.s:170 .text.arm_pid_reset_q15:0000000000000000 $t
/tmp/ccp28G4X.s:178 .text.arm_pid_reset_q15:0000000000000000 arm_pid_reset_q15
/tmp/ccp28G4X.s:188 .text.arm_pid_reset_q31:0000000000000000 $t
/tmp/ccp28G4X.s:196 .text.arm_pid_reset_q31:0000000000000000 arm_pid_reset_q31
/tmp/ccp28G4X.s:207 .text.arm_sin_cos_f32:0000000000000000 $t
/tmp/ccp28G4X.s:215 .text.arm_sin_cos_f32:0000000000000000 arm_sin_cos_f32
/tmp/ccp28G4X.s:283 .text.arm_sin_cos_f32:00000000000000f0 $d
/tmp/ccp28G4X.s:289 .text.arm_sin_cos_q31:0000000000000000 $t
/tmp/ccp28G4X.s:297 .text.arm_sin_cos_q31:0000000000000000 arm_sin_cos_q31
/tmp/ccp28G4X.s:425 .text.arm_sin_cos_q31:00000000000001a4 $d
UNDEFINED SYMBOLS
sinTable_f32
sinTable_q31

Binary file not shown.

View File

@@ -1,47 +0,0 @@
build/DistanceFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/DistanceFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_boolean_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_boolean_distance_template.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_braycurtis_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_canberra_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_chebyshev_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_cityblock_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_correlation_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_cosine_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_dice_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_euclidean_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_hamming_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_jaccard_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_jensenshannon_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_kulsinski_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_minkowski_distance_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_rogerstanimoto_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_russellrao_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_sokalmichener_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_sokalsneath_distance.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_yule_distance.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_boolean_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_boolean_distance_template.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_braycurtis_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_canberra_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_chebyshev_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_cityblock_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_correlation_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_cosine_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_dice_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_euclidean_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_hamming_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_jaccard_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_jensenshannon_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_kulsinski_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_minkowski_distance_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_rogerstanimoto_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_russellrao_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_sokalmichener_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_sokalsneath_distance.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/DistanceFunctions/arm_yule_distance.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,2 +0,0 @@
build/FIRFilterCode.o: Core/Src/FIRFilterCode.c Core/Inc/FIRFilterCode.h
Core/Inc/FIRFilterCode.h:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,31 +0,0 @@
build/FastMathFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/FastMathFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_cos_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_cos_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_cos_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sin_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sin_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sin_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_vexp_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_vlog_f32.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_cos_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_cos_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_cos_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sin_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sin_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sin_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_sqrt_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_vexp_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FastMathFunctions/arm_vlog_f32.c:

View File

@@ -1,569 +0,0 @@
ARM GAS /tmp/ccm2QK1c.s page 1
1 .cpu cortex-m4
2 .eabi_attribute 27, 1
3 .eabi_attribute 28, 1
4 .eabi_attribute 20, 1
5 .eabi_attribute 21, 1
6 .eabi_attribute 23, 3
7 .eabi_attribute 24, 1
8 .eabi_attribute 25, 1
9 .eabi_attribute 26, 1
10 .eabi_attribute 30, 2
11 .eabi_attribute 34, 1
12 .eabi_attribute 18, 4
13 .file "FastMathFunctions.c"
14 .text
15 .section .text.arm_cos_f32,"ax",%progbits
16 .align 1
17 .p2align 2,,3
18 .global arm_cos_f32
19 .arch armv7e-m
20 .syntax unified
21 .thumb
22 .thumb_func
23 .fpu fpv4-sp-d16
25 arm_cos_f32:
26 @ args = 0, pretend = 0, frame = 0
27 @ frame_needed = 0, uses_anonymous_args = 0
28 @ link register save eliminated.
29 0000 9FED207A vldr.32 s14, .L8
30 0004 F5EE007A vmov.f32 s15, #2.5e-1
31 0008 E0EE077A vfma.f32 s15, s0, s14
32 000c F5EEC07A vcmpe.f32 s15, #0
33 0010 F1EE10FA vmrs APSR_nzcv, FPSCR
34 0014 BDEEE70A vcvt.s32.f32 s0, s15
35 0018 04D5 bpl .L2
36 001a 10EE103A vmov r3, s0 @ int
37 001e 013B subs r3, r3, #1
38 0020 00EE103A vmov s0, r3 @ int
39 .L2:
40 0024 B8EEC00A vcvt.f32.s32 s0, s0
41 0028 DFED176A vldr.32 s13, .L8+4
42 002c 37EEC00A vsub.f32 s0, s15, s0
43 0030 20EE260A vmul.f32 s0, s0, s13
44 0034 BCEEC07A vcvt.u32.f32 s14, s0
45 0038 17EE103A vmov r3, s14 @ int
46 003c 9BB2 uxth r3, r3
47 003e B3F5007F cmp r3, #512
48 0042 19D2 bcs .L4
49 0044 07EE903A vmov s15, r3 @ int
50 0048 F8EE677A vcvt.f32.u32 s15, s15
51 004c 591C adds r1, r3, #1
52 004e 30EE670A vsub.f32 s0, s0, s15
53 0052 89B2 uxth r1, r1
54 .L5:
55 0054 0D4A ldr r2, .L8+8
56 0056 02EB8101 add r1, r2, r1, lsl #2
57 005a 91ED007A vldr.32 s14, [r1]
58 005e 02EB8303 add r3, r2, r3, lsl #2
ARM GAS /tmp/ccm2QK1c.s page 2
59 0062 F7EE007A vmov.f32 s15, #1.0e+0
60 0066 77EEC07A vsub.f32 s15, s15, s0
61 006a 20EE070A vmul.f32 s0, s0, s14
62 006e 93ED007A vldr.32 s14, [r3]
63 0072 A7EE870A vfma.f32 s0, s15, s14
64 0076 7047 bx lr
65 .L4:
66 0078 30EE660A vsub.f32 s0, s0, s13
67 007c 0121 movs r1, #1
68 007e 0023 movs r3, #0
69 0080 E8E7 b .L5
70 .L9:
71 0082 00BF .align 2
72 .L8:
73 0084 83F9223E .word 1042479491
74 0088 00000044 .word 1140850688
75 008c 00000000 .word sinTable_f32
77 .section .text.arm_cos_q15,"ax",%progbits
78 .align 1
79 .p2align 2,,3
80 .global arm_cos_q15
81 .syntax unified
82 .thumb
83 .thumb_func
84 .fpu fpv4-sp-d16
86 arm_cos_q15:
87 @ args = 0, pretend = 0, frame = 0
88 @ frame_needed = 0, uses_anonymous_args = 0
89 @ link register save eliminated.
90 0000 80B2 uxth r0, r0
91 0002 00F50053 add r3, r0, #8192
92 0006 1BB2 sxth r3, r3
93 0008 002B cmp r3, #0
94 000a BCBF itt lt
95 000c A0F5C040 sublt r0, r0, #24576
96 0010 03B2 sxthlt r3, r0
97 0012 9909 lsrs r1, r3, #6
98 0014 0A4A ldr r2, .L12
99 0016 481C adds r0, r1, #1
100 0018 03F03F03 and r3, r3, #63
101 001c 32F91110 ldrsh r1, [r2, r1, lsl #1]
102 0020 32F81020 ldrh r2, [r2, r0, lsl #1]
103 0024 5B02 lsls r3, r3, #9
104 0026 C3F50040 rsb r0, r3, #32768
105 002a 01FB00F0 mul r0, r1, r0
106 002e 000C lsrs r0, r0, #16
107 0030 0004 lsls r0, r0, #16
108 0032 13FB0203 smlabb r3, r3, r2, r0
109 0036 43F3CF30 sbfx r0, r3, #15, #16
110 003a 20F00100 bic r0, r0, #1
111 003e 7047 bx lr
112 .L13:
113 .align 2
114 .L12:
115 0040 00000000 .word sinTable_q15
117 .section .text.arm_cos_q31,"ax",%progbits
118 .align 1
ARM GAS /tmp/ccm2QK1c.s page 3
119 .p2align 2,,3
120 .global arm_cos_q31
121 .syntax unified
122 .thumb
123 .thumb_func
124 .fpu fpv4-sp-d16
126 arm_cos_q31:
127 @ args = 0, pretend = 0, frame = 0
128 @ frame_needed = 0, uses_anonymous_args = 0
129 0000 10F10052 adds r2, r0, #536870912
130 0004 48BF it mi
131 0006 00F12042 addmi r2, r0, #-1610612736
132 000a 0C49 ldr r1, .L17
133 000c 0C4B ldr r3, .L17+4
134 000e 900D lsrs r0, r2, #22
135 0010 03EA4223 and r3, r3, r2, lsl #9
136 0014 10B5 push {r4, lr}
137 0016 441C adds r4, r0, #1
138 0018 51F82000 ldr r0, [r1, r0, lsl #2]
139 001c 51F82440 ldr r4, [r1, r4, lsl #2]
140 0020 C3F1004C rsb ip, r3, #-2147483648
141 0024 4FEAE07E asr lr, r0, #31
142 0028 ACFB0020 umull r2, r0, ip, r0
143 002c 0CFB0E00 mla r0, ip, lr, r0
144 0030 0021 movs r1, #0
145 0032 C3FB0410 smlal r1, r0, r3, r4
146 0036 4000 lsls r0, r0, #1
147 0038 10BD pop {r4, pc}
148 .L18:
149 003a 00BF .align 2
150 .L17:
151 003c 00000000 .word sinTable_q31
152 0040 00FEFF7F .word 2147483136
154 .section .text.arm_sin_f32,"ax",%progbits
155 .align 1
156 .p2align 2,,3
157 .global arm_sin_f32
158 .syntax unified
159 .thumb
160 .thumb_func
161 .fpu fpv4-sp-d16
163 arm_sin_f32:
164 @ args = 0, pretend = 0, frame = 0
165 @ frame_needed = 0, uses_anonymous_args = 0
166 @ link register save eliminated.
167 0000 DFED1F7A vldr.32 s15, .L25
168 0004 20EE270A vmul.f32 s0, s0, s15
169 0008 B5EEC00A vcmpe.f32 s0, #0
170 000c F1EE10FA vmrs APSR_nzcv, FPSCR
171 0010 FDEEC07A vcvt.s32.f32 s15, s0
172 0014 04D5 bpl .L20
173 0016 17EE903A vmov r3, s15 @ int
174 001a 013B subs r3, r3, #1
175 001c 07EE903A vmov s15, r3 @ int
176 .L20:
177 0020 F8EEE77A vcvt.f32.s32 s15, s15
178 0024 9FED177A vldr.32 s14, .L25+4
ARM GAS /tmp/ccm2QK1c.s page 4
179 0028 30EE670A vsub.f32 s0, s0, s15
180 002c 20EE070A vmul.f32 s0, s0, s14
181 0030 FCEEC07A vcvt.u32.f32 s15, s0
182 0034 17EE903A vmov r3, s15 @ int
183 0038 9BB2 uxth r3, r3
184 003a B3F5007F cmp r3, #512
185 003e 19D2 bcs .L22
186 0040 07EE903A vmov s15, r3 @ int
187 0044 F8EE677A vcvt.f32.u32 s15, s15
188 0048 591C adds r1, r3, #1
189 004a 30EE670A vsub.f32 s0, s0, s15
190 004e 89B2 uxth r1, r1
191 .L23:
192 0050 0D4A ldr r2, .L25+8
193 0052 02EB8101 add r1, r2, r1, lsl #2
194 0056 91ED007A vldr.32 s14, [r1]
195 005a 02EB8303 add r3, r2, r3, lsl #2
196 005e F7EE007A vmov.f32 s15, #1.0e+0
197 0062 77EEC07A vsub.f32 s15, s15, s0
198 0066 20EE070A vmul.f32 s0, s0, s14
199 006a 93ED007A vldr.32 s14, [r3]
200 006e A7EE870A vfma.f32 s0, s15, s14
201 0072 7047 bx lr
202 .L22:
203 0074 30EE470A vsub.f32 s0, s0, s14
204 0078 0121 movs r1, #1
205 007a 0023 movs r3, #0
206 007c E8E7 b .L23
207 .L26:
208 007e 00BF .align 2
209 .L25:
210 0080 83F9223E .word 1042479491
211 0084 00000044 .word 1140850688
212 0088 00000000 .word sinTable_f32
214 .section .text.arm_sin_q15,"ax",%progbits
215 .align 1
216 .p2align 2,,3
217 .global arm_sin_q15
218 .syntax unified
219 .thumb
220 .thumb_func
221 .fpu fpv4-sp-d16
223 arm_sin_q15:
224 @ args = 0, pretend = 0, frame = 0
225 @ frame_needed = 0, uses_anonymous_args = 0
226 @ link register save eliminated.
227 0000 0028 cmp r0, #0
228 0002 BCBF itt lt
229 0004 A0F50040 sublt r0, r0, #32768
230 0008 00B2 sxthlt r0, r0
231 000a 8309 lsrs r3, r0, #6
232 000c 0B4A ldr r2, .L29
233 000e 00F03F00 and r0, r0, #63
234 0012 32F91310 ldrsh r1, [r2, r3, lsl #1]
235 0016 4002 lsls r0, r0, #9
236 0018 03F1010C add ip, r3, #1
237 001c C0F50043 rsb r3, r0, #32768
ARM GAS /tmp/ccm2QK1c.s page 5
238 0020 01FB03F3 mul r3, r1, r3
239 0024 32F81C20 ldrh r2, [r2, ip, lsl #1]
240 0028 1B0C lsrs r3, r3, #16
241 002a 1B04 lsls r3, r3, #16
242 002c 10FB0230 smlabb r0, r0, r2, r3
243 0030 40F3CF30 sbfx r0, r0, #15, #16
244 0034 20F00100 bic r0, r0, #1
245 0038 7047 bx lr
246 .L30:
247 003a 00BF .align 2
248 .L29:
249 003c 00000000 .word sinTable_q15
251 .section .text.arm_sin_q31,"ax",%progbits
252 .align 1
253 .p2align 2,,3
254 .global arm_sin_q31
255 .syntax unified
256 .thumb
257 .thumb_func
258 .fpu fpv4-sp-d16
260 arm_sin_q31:
261 @ args = 0, pretend = 0, frame = 0
262 @ frame_needed = 0, uses_anonymous_args = 0
263 0000 0028 cmp r0, #0
264 0002 B6BF itet lt
265 0004 00F10042 addlt r2, r0, #-2147483648
266 0008 0246 movge r2, r0
267 000a 1046 movlt r0, r2
268 000c 0B49 ldr r1, .L35
269 000e 0C4B ldr r3, .L35+4
270 0010 920D lsrs r2, r2, #22
271 0012 03EA4023 and r3, r3, r0, lsl #9
272 0016 10B5 push {r4, lr}
273 0018 541C adds r4, r2, #1
274 001a 51F82220 ldr r2, [r1, r2, lsl #2]
275 001e 51F82440 ldr r4, [r1, r4, lsl #2]
276 0022 C3F1004C rsb ip, r3, #-2147483648
277 0026 4FEAE27E asr lr, r2, #31
278 002a ACFB0220 umull r2, r0, ip, r2
279 002e 0CFB0E00 mla r0, ip, lr, r0
280 0032 0021 movs r1, #0
281 0034 C3FB0410 smlal r1, r0, r3, r4
282 0038 4000 lsls r0, r0, #1
283 003a 10BD pop {r4, pc}
284 .L36:
285 .align 2
286 .L35:
287 003c 00000000 .word sinTable_q31
288 0040 00FEFF7F .word 2147483136
290 .section .text.arm_sqrt_q15,"ax",%progbits
291 .align 1
292 .p2align 2,,3
293 .global arm_sqrt_q15
294 .syntax unified
295 .thumb
296 .thumb_func
297 .fpu fpv4-sp-d16
ARM GAS /tmp/ccm2QK1c.s page 6
299 arm_sqrt_q15:
300 @ args = 0, pretend = 0, frame = 0
301 @ frame_needed = 0, uses_anonymous_args = 0
302 0000 0028 cmp r0, #0
303 0002 63DD ble .L38
304 0004 B0FA80F2 clz r2, r0
305 0008 113A subs r2, r2, #17
306 000a 1FFA82FC uxth ip, r2
307 000e 12F00102 ands r2, r2, #1
308 0012 10B5 push {r4, lr}
309 0014 16BF itet ne
310 0016 0CF1FF3E addne lr, ip, #-1
311 001a 00FA0CF0 lsleq r0, r0, ip
312 001e 00FA0EF0 lslne r0, r0, lr
313 0022 0FFA80FE sxth lr, r0
314 0026 07EE90EA vmov s15, lr @ int
315 002a FAEEE87A vcvt.f32.s32 s15, s15, #15
316 002e 2A4B ldr r3, .L49
317 0030 17EE900A vmov r0, s15 @ int
318 0034 A3EB6003 sub r3, r3, r0, asr #1
319 0038 07EE903A vmov s15, r3 @ int
320 003c FEEEC97A vcvt.s32.f32 s15, s15, #14
321 0040 4FEA6E04 asr r4, lr, #1
322 0044 17EE903A vmov r3, s15 @ int
323 0048 1BB2 sxth r3, r3
324 004a 03FB03F0 mul r0, r3, r3
325 004e C013 asrs r0, r0, #15
326 0050 10FB04F0 smulbb r0, r0, r4
327 0054 C013 asrs r0, r0, #15
328 0056 C0F54050 rsb r0, r0, #12288
329 005a 03FB00F0 mul r0, r3, r0
330 005e 40F34F30 sbfx r0, r0, #13, #16
331 0062 20F00303 bic r3, r0, #3
332 0066 03FB03F0 mul r0, r3, r3
333 006a C013 asrs r0, r0, #15
334 006c 10FB04F0 smulbb r0, r0, r4
335 0070 C013 asrs r0, r0, #15
336 0072 C0F54050 rsb r0, r0, #12288
337 0076 03FB00F0 mul r0, r3, r0
338 007a 40F34F30 sbfx r0, r0, #13, #16
339 007e 20F00300 bic r0, r0, #3
340 0082 00FB00F3 mul r3, r0, r0
341 0086 DB13 asrs r3, r3, #15
342 0088 13FB04F3 smulbb r3, r3, r4
343 008c DB13 asrs r3, r3, #15
344 008e C3F54053 rsb r3, r3, #12288
345 0092 00FB03F3 mul r3, r0, r3
346 0096 DB13 asrs r3, r3, #15
347 0098 9B00 lsls r3, r3, #2
348 009a 13FB0EF3 smulbb r3, r3, lr
349 009e 43F38F33 sbfx r3, r3, #14, #16
350 00a2 23F00103 bic r3, r3, #1
351 00a6 4AB1 cbz r2, .L48
352 00a8 0CF1FF3C add ip, ip, #-1
353 00ac 4FEA6C0C asr ip, ip, #1
354 00b0 43FA0CF3 asr r3, r3, ip
355 00b4 1BB2 sxth r3, r3
ARM GAS /tmp/ccm2QK1c.s page 7
356 00b6 0B80 strh r3, [r1] @ movhi
357 00b8 0020 movs r0, #0
358 00ba 10BD pop {r4, pc}
359 .L48:
360 00bc 4CF34E0C sbfx ip, ip, #1, #15
361 00c0 43FA0CF3 asr r3, r3, ip
362 00c4 1BB2 sxth r3, r3
363 00c6 0B80 strh r3, [r1] @ movhi
364 00c8 0020 movs r0, #0
365 00ca 10BD pop {r4, pc}
366 .L38:
367 00cc 0023 movs r3, #0
368 00ce 0B80 strh r3, [r1] @ movhi
369 00d0 4FF0FF30 mov r0, #-1
370 00d4 7047 bx lr
371 .L50:
372 00d6 00BF .align 2
373 .L49:
374 00d8 DF59375F .word 1597463007
376 .section .text.arm_sqrt_q31,"ax",%progbits
377 .align 1
378 .p2align 2,,3
379 .global arm_sqrt_q31
380 .syntax unified
381 .thumb
382 .thumb_func
383 .fpu fpv4-sp-d16
385 arm_sqrt_q31:
386 @ args = 0, pretend = 0, frame = 0
387 @ frame_needed = 0, uses_anonymous_args = 0
388 0000 021E subs r2, r0, #0
389 0002 6CDD ble .L52
390 0004 B2FA82FC clz ip, r2
391 0008 F0B5 push {r4, r5, r6, r7, lr}
392 000a 0CF1FF3E add lr, ip, #-1
393 000e 1EF00104 ands r4, lr, #1
394 0012 16BF itet ne
395 0014 ACF10206 subne r6, ip, #2
396 0018 02FA0EF6 lsleq r6, r2, lr
397 001c 02FA06F6 lslne r6, r2, r6
398 0020 07EE906A vmov s15, r6 @ int
399 0024 FAEEE07A vcvt.f32.s32 s15, s15, #31
400 0028 2F4B ldr r3, .L63
401 002a 17EE900A vmov r0, s15
402 002e A3EB6000 sub r0, r3, r0, asr #1
403 0032 07EE900A vmov s15, r0
404 0036 FEEEC17A vcvt.s32.f32 s15, s15, #30
405 003a 7310 asrs r3, r6, #1
406 003c 17EE900A vmov r0, s15 @ int
407 0040 80FB0057 smull r5, r7, r0, r0
408 0044 EA0F lsrs r2, r5, #31
409 0046 42EA4702 orr r2, r2, r7, lsl #1
410 004a 83FB0257 smull r5, r7, r3, r2
411 004e EA0F lsrs r2, r5, #31
412 0050 42EA4702 orr r2, r2, r7, lsl #1
413 0054 C2F14052 rsb r2, r2, #805306368
414 0058 82FB0002 smull r0, r2, r2, r0
ARM GAS /tmp/ccm2QK1c.s page 8
415 005c C00F lsrs r0, r0, #31
416 005e 40EA4200 orr r0, r0, r2, lsl #1
417 0062 8000 lsls r0, r0, #2
418 0064 80FB0052 smull r5, r2, r0, r0
419 0068 ED0F lsrs r5, r5, #31
420 006a 45EA4205 orr r5, r5, r2, lsl #1
421 006e 83FB0552 smull r5, r2, r3, r5
422 0072 ED0F lsrs r5, r5, #31
423 0074 45EA4205 orr r5, r5, r2, lsl #1
424 0078 C5F14055 rsb r5, r5, #805306368
425 007c 85FB0005 smull r0, r5, r5, r0
426 0080 C00F lsrs r0, r0, #31
427 0082 40EA4500 orr r0, r0, r5, lsl #1
428 0086 8200 lsls r2, r0, #2
429 0088 82FB0205 smull r0, r5, r2, r2
430 008c C00F lsrs r0, r0, #31
431 008e 40EA4500 orr r0, r0, r5, lsl #1
432 0092 83FB0035 smull r3, r5, r3, r0
433 0096 D80F lsrs r0, r3, #31
434 0098 40EA4500 orr r0, r0, r5, lsl #1
435 009c C0F14050 rsb r0, r0, #805306368
436 00a0 80FB0203 smull r0, r3, r0, r2
437 00a4 C20F lsrs r2, r0, #31
438 00a6 42EA4302 orr r2, r2, r3, lsl #1
439 00aa 9200 lsls r2, r2, #2
440 00ac 82FB0626 smull r2, r6, r2, r6
441 00b0 D30F lsrs r3, r2, #31
442 00b2 43EA4603 orr r3, r3, r6, lsl #1
443 00b6 5B00 lsls r3, r3, #1
444 00b8 54B1 cbz r4, .L62
445 00ba ACF1020C sub ip, ip, #2
446 00be 0CEBDC7C add ip, ip, ip, lsr #31
447 00c2 4FEA6C0C asr ip, ip, #1
448 00c6 43FA0CF3 asr r3, r3, ip
449 00ca 0B60 str r3, [r1]
450 00cc 0020 movs r0, #0
451 00ce F0BD pop {r4, r5, r6, r7, pc}
452 .L62:
453 00d0 4FEA6E0E asr lr, lr, #1
454 00d4 43FA0EF3 asr r3, r3, lr
455 00d8 0B60 str r3, [r1]
456 00da 0020 movs r0, #0
457 00dc F0BD pop {r4, r5, r6, r7, pc}
458 .L52:
459 00de 0023 movs r3, #0
460 00e0 0B60 str r3, [r1]
461 00e2 4FF0FF30 mov r0, #-1
462 00e6 7047 bx lr
463 .L64:
464 .align 2
465 .L63:
466 00e8 DF59375F .word 1597463007
468 .section .text.arm_vexp_f32,"ax",%progbits
469 .align 1
470 .p2align 2,,3
471 .global arm_vexp_f32
472 .syntax unified
ARM GAS /tmp/ccm2QK1c.s page 9
473 .thumb
474 .thumb_func
475 .fpu fpv4-sp-d16
477 arm_vexp_f32:
478 @ args = 0, pretend = 0, frame = 0
479 @ frame_needed = 0, uses_anonymous_args = 0
480 0000 62B1 cbz r2, .L73
481 0002 70B5 push {r4, r5, r6, lr}
482 0004 0646 mov r6, r0
483 0006 0D46 mov r5, r1
484 0008 1446 mov r4, r2
485 .L67:
486 000a B6EC010A vldmia.32 r6!, {s0}
487 000e FFF7FEFF bl expf
488 0012 013C subs r4, r4, #1
489 0014 A5EC010A vstmia.32 r5!, {s0}
490 0018 F7D1 bne .L67
491 001a 70BD pop {r4, r5, r6, pc}
492 .L73:
493 001c 7047 bx lr
495 001e 00BF .section .text.arm_vlog_f32,"ax",%progbits
496 .align 1
497 .p2align 2,,3
498 .global arm_vlog_f32
499 .syntax unified
500 .thumb
501 .thumb_func
502 .fpu fpv4-sp-d16
504 arm_vlog_f32:
505 @ args = 0, pretend = 0, frame = 0
506 @ frame_needed = 0, uses_anonymous_args = 0
507 0000 62B1 cbz r2, .L84
508 0002 70B5 push {r4, r5, r6, lr}
509 0004 0646 mov r6, r0
510 0006 0D46 mov r5, r1
511 0008 1446 mov r4, r2
512 .L78:
513 000a B6EC010A vldmia.32 r6!, {s0}
514 000e FFF7FEFF bl logf
515 0012 013C subs r4, r4, #1
516 0014 A5EC010A vstmia.32 r5!, {s0}
517 0018 F7D1 bne .L78
518 001a 70BD pop {r4, r5, r6, pc}
519 .L84:
520 001c 7047 bx lr
522 001e 00BF .ident "GCC: (15:10.3-2021.07-4) 10.3.1 20210621 (release)"
ARM GAS /tmp/ccm2QK1c.s page 10
DEFINED SYMBOLS
*ABS*:0000000000000000 FastMathFunctions.c
/tmp/ccm2QK1c.s:16 .text.arm_cos_f32:0000000000000000 $t
/tmp/ccm2QK1c.s:25 .text.arm_cos_f32:0000000000000000 arm_cos_f32
/tmp/ccm2QK1c.s:73 .text.arm_cos_f32:0000000000000084 $d
/tmp/ccm2QK1c.s:78 .text.arm_cos_q15:0000000000000000 $t
/tmp/ccm2QK1c.s:86 .text.arm_cos_q15:0000000000000000 arm_cos_q15
/tmp/ccm2QK1c.s:115 .text.arm_cos_q15:0000000000000040 $d
/tmp/ccm2QK1c.s:118 .text.arm_cos_q31:0000000000000000 $t
/tmp/ccm2QK1c.s:126 .text.arm_cos_q31:0000000000000000 arm_cos_q31
/tmp/ccm2QK1c.s:151 .text.arm_cos_q31:000000000000003c $d
/tmp/ccm2QK1c.s:155 .text.arm_sin_f32:0000000000000000 $t
/tmp/ccm2QK1c.s:163 .text.arm_sin_f32:0000000000000000 arm_sin_f32
/tmp/ccm2QK1c.s:210 .text.arm_sin_f32:0000000000000080 $d
/tmp/ccm2QK1c.s:215 .text.arm_sin_q15:0000000000000000 $t
/tmp/ccm2QK1c.s:223 .text.arm_sin_q15:0000000000000000 arm_sin_q15
/tmp/ccm2QK1c.s:249 .text.arm_sin_q15:000000000000003c $d
/tmp/ccm2QK1c.s:252 .text.arm_sin_q31:0000000000000000 $t
/tmp/ccm2QK1c.s:260 .text.arm_sin_q31:0000000000000000 arm_sin_q31
/tmp/ccm2QK1c.s:287 .text.arm_sin_q31:000000000000003c $d
/tmp/ccm2QK1c.s:291 .text.arm_sqrt_q15:0000000000000000 $t
/tmp/ccm2QK1c.s:299 .text.arm_sqrt_q15:0000000000000000 arm_sqrt_q15
/tmp/ccm2QK1c.s:374 .text.arm_sqrt_q15:00000000000000d8 $d
/tmp/ccm2QK1c.s:377 .text.arm_sqrt_q31:0000000000000000 $t
/tmp/ccm2QK1c.s:385 .text.arm_sqrt_q31:0000000000000000 arm_sqrt_q31
/tmp/ccm2QK1c.s:466 .text.arm_sqrt_q31:00000000000000e8 $d
/tmp/ccm2QK1c.s:469 .text.arm_vexp_f32:0000000000000000 $t
/tmp/ccm2QK1c.s:477 .text.arm_vexp_f32:0000000000000000 arm_vexp_f32
/tmp/ccm2QK1c.s:496 .text.arm_vlog_f32:0000000000000000 $t
/tmp/ccm2QK1c.s:504 .text.arm_vlog_f32:0000000000000000 arm_vlog_f32
UNDEFINED SYMBOLS
sinTable_f32
sinTable_q15
sinTable_q31
expf
logf

Binary file not shown.

View File

@@ -1,209 +0,0 @@
build/FilteringFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/FilteringFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_fast_opt_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_fast_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_fast_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_opt_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_opt_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_fast_opt_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_fast_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_fast_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_opt_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_opt_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_fast_opt_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_fast_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_fast_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_opt_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_opt_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_fast_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_fast_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_fast_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_fast_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_q31.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_32x64_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_fast_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df1_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_df2T_init_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_fast_opt_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_fast_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_fast_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_opt_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_opt_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_fast_opt_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_fast_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_fast_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_opt_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_opt_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_conv_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_fast_opt_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_fast_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_fast_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_opt_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_opt_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_correlate_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_fast_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_fast_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_fast_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_fast_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_init_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_interpolate_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_lattice_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_init_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_fir_sparse_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_iir_lattice_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_norm_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/FilteringFunctions/arm_lms_q31.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,57 +0,0 @@
build/MatrixFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/MatrixFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_add_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_add_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_add_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_cmplx_mult_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_cmplx_mult_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_cmplx_mult_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_inverse_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_inverse_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_fast_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_fast_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_scale_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_scale_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_scale_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_sub_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_sub_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_sub_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_trans_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_trans_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_trans_q31.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_add_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_add_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_add_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_cmplx_mult_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_cmplx_mult_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_cmplx_mult_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_inverse_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_inverse_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_fast_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_fast_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_mult_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_scale_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_scale_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_scale_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_sub_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_sub_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_sub_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_trans_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_trans_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/MatrixFunctions/arm_mat_trans_q31.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,23 +0,0 @@
build/SVMFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/SVMFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_linear_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_linear_predict_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_polynomial_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_polynomial_predict_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_rbf_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_rbf_predict_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_sigmoid_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_sigmoid_predict_f32.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_linear_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_linear_predict_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_polynomial_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_polynomial_predict_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_rbf_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_rbf_predict_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_sigmoid_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SVMFunctions/arm_svm_sigmoid_predict_f32.c:

View File

@@ -1,379 +0,0 @@
ARM GAS /tmp/ccYN11sI.s page 1
1 .cpu cortex-m4
2 .eabi_attribute 27, 1
3 .eabi_attribute 28, 1
4 .eabi_attribute 20, 1
5 .eabi_attribute 21, 1
6 .eabi_attribute 23, 3
7 .eabi_attribute 24, 1
8 .eabi_attribute 25, 1
9 .eabi_attribute 26, 1
10 .eabi_attribute 30, 2
11 .eabi_attribute 34, 1
12 .eabi_attribute 18, 4
13 .file "SVMFunctions.c"
14 .text
15 .section .text.arm_svm_linear_init_f32,"ax",%progbits
16 .align 1
17 .p2align 2,,3
18 .global arm_svm_linear_init_f32
19 .arch armv7e-m
20 .syntax unified
21 .thumb
22 .thumb_func
23 .fpu fpv4-sp-d16
25 arm_svm_linear_init_f32:
26 @ args = 8, pretend = 0, frame = 0
27 @ frame_needed = 0, uses_anonymous_args = 0
28 @ link register save eliminated.
29 0000 C0E90012 strd r1, r2, [r0]
30 0004 C360 str r3, [r0, #12]
31 0006 DDE90023 ldrd r2, r3, [sp]
32 000a 80ED020A vstr.32 s0, [r0, #8]
33 000e C0E90423 strd r2, r3, [r0, #16]
34 0012 7047 bx lr
36 .section .text.arm_svm_linear_predict_f32,"ax",%progbits
37 .align 1
38 .p2align 2,,3
39 .global arm_svm_linear_predict_f32
40 .syntax unified
41 .thumb
42 .thumb_func
43 .fpu fpv4-sp-d16
45 arm_svm_linear_predict_f32:
46 @ args = 0, pretend = 0, frame = 0
47 @ frame_needed = 0, uses_anonymous_args = 0
48 0000 F0B5 push {r4, r5, r6, r7, lr}
49 0002 0568 ldr r5, [r0]
50 0004 90ED026A vldr.32 s12, [r0, #8]
51 0008 0369 ldr r3, [r0, #16]
52 000a C5B1 cbz r5, .L4
53 000c 4668 ldr r6, [r0, #4]
54 000e C468 ldr r4, [r0, #12]
55 0010 B700 lsls r7, r6, #2
56 0012 04EB8505 add r5, r4, r5, lsl #2
57 .L5:
58 0016 DFED107A vldr.32 s15, .L14
59 001a 56B1 cbz r6, .L8
60 001c 8C46 mov ip, r1
ARM GAS /tmp/ccYN11sI.s page 2
61 001e 03EB070E add lr, r3, r7
62 .L6:
63 0022 B3EC017A vldmia.32 r3!, {s14}
64 0026 FCEC016A vldmia.32 ip!, {s13}
65 002a 7345 cmp r3, lr
66 002c E6EE877A vfma.f32 s15, s13, s14
67 0030 F7D1 bne .L6
68 .L8:
69 0032 B4EC017A vldmia.32 r4!, {s14}
70 0036 A542 cmp r5, r4
71 0038 A7EE276A vfma.f32 s12, s14, s15
72 003c EBD1 bne .L5
73 .L4:
74 003e B5EEC06A vcmpe.f32 s12, #0
75 0042 F1EE10FA vmrs APSR_nzcv, FPSCR
76 0046 4369 ldr r3, [r0, #20]
77 0048 8CBF ite hi
78 004a 0121 movhi r1, #1
79 004c 0021 movls r1, #0
80 004e 53F82130 ldr r3, [r3, r1, lsl #2]
81 0052 1360 str r3, [r2]
82 0054 F0BD pop {r4, r5, r6, r7, pc}
83 .L15:
84 0056 00BF .align 2
85 .L14:
86 0058 00000000 .word 0
88 .section .text.arm_svm_polynomial_init_f32,"ax",%progbits
89 .align 1
90 .p2align 2,,3
91 .global arm_svm_polynomial_init_f32
92 .syntax unified
93 .thumb
94 .thumb_func
95 .fpu fpv4-sp-d16
97 arm_svm_polynomial_init_f32:
98 @ args = 12, pretend = 0, frame = 0
99 @ frame_needed = 0, uses_anonymous_args = 0
100 @ link register save eliminated.
101 0000 C360 str r3, [r0, #12]
102 0002 009B ldr r3, [sp]
103 0004 0361 str r3, [r0, #16]
104 0006 C0E90012 strd r1, r2, [r0]
105 000a DDE90123 ldrd r2, r3, [sp, #4]
106 000e 80ED020A vstr.32 s0, [r0, #8]
107 0012 C0E90523 strd r2, r3, [r0, #20]
108 0016 C0ED070A vstr.32 s1, [r0, #28]
109 001a 80ED081A vstr.32 s2, [r0, #32]
110 001e 7047 bx lr
112 .section .text.arm_svm_polynomial_predict_f32,"ax",%progbits
113 .align 1
114 .p2align 2,,3
115 .global arm_svm_polynomial_predict_f32
116 .syntax unified
117 .thumb
118 .thumb_func
119 .fpu fpv4-sp-d16
121 arm_svm_polynomial_predict_f32:
ARM GAS /tmp/ccYN11sI.s page 3
122 @ args = 0, pretend = 0, frame = 0
123 @ frame_needed = 0, uses_anonymous_args = 0
124 0000 2DE9F041 push {r4, r5, r6, r7, r8, lr}
125 0004 0668 ldr r6, [r0]
126 0006 90ED026A vldr.32 s12, [r0, #8]
127 000a 0369 ldr r3, [r0, #16]
128 000c 6EB3 cbz r6, .L18
129 000e 4768 ldr r7, [r0, #4]
130 0010 8569 ldr r5, [r0, #24]
131 0012 C468 ldr r4, [r0, #12]
132 0014 90ED085A vldr.32 s10, [r0, #32]
133 0018 D0ED075A vldr.32 s11, [r0, #28]
134 001c 013D subs r5, r5, #1
135 001e 04EB8606 add r6, r4, r6, lsl #2
136 0022 4FEA8708 lsl r8, r7, #2
137 .L19:
138 0026 DFED177A vldr.32 s15, .L32
139 002a 57B1 cbz r7, .L24
140 002c 8C46 mov ip, r1
141 002e 03EB080E add lr, r3, r8
142 .L20:
143 0032 B3EC017A vldmia.32 r3!, {s14}
144 0036 FCEC016A vldmia.32 ip!, {s13}
145 003a 7345 cmp r3, lr
146 003c E6EE877A vfma.f32 s15, s13, s14
147 0040 F7D1 bne .L20
148 .L24:
149 0042 B0EE657A vmov.f32 s14, s11
150 0046 A7EE857A vfma.f32 s14, s15, s10
151 004a 002D cmp r5, #0
152 004c F4EC016A vldmia.32 r4!, {s13}
153 0050 F0EE477A vmov.f32 s15, s14
154 0054 05DD ble .L21
155 0056 AC46 mov ip, r5
156 .L22:
157 0058 BCF1010C subs ip, ip, #1
158 005c 67EE877A vmul.f32 s15, s15, s14
159 0060 FAD1 bne .L22
160 .L21:
161 0062 A642 cmp r6, r4
162 0064 A6EEA76A vfma.f32 s12, s13, s15
163 0068 DDD1 bne .L19
164 .L18:
165 006a B5EEC06A vcmpe.f32 s12, #0
166 006e F1EE10FA vmrs APSR_nzcv, FPSCR
167 0072 4369 ldr r3, [r0, #20]
168 0074 8CBF ite hi
169 0076 0121 movhi r1, #1
170 0078 0021 movls r1, #0
171 007a 53F82130 ldr r3, [r3, r1, lsl #2]
172 007e 1360 str r3, [r2]
173 0080 BDE8F081 pop {r4, r5, r6, r7, r8, pc}
174 .L33:
175 .align 2
176 .L32:
177 0084 00000000 .word 0
179 .section .text.arm_svm_rbf_init_f32,"ax",%progbits
ARM GAS /tmp/ccYN11sI.s page 4
180 .align 1
181 .p2align 2,,3
182 .global arm_svm_rbf_init_f32
183 .syntax unified
184 .thumb
185 .thumb_func
186 .fpu fpv4-sp-d16
188 arm_svm_rbf_init_f32:
189 @ args = 8, pretend = 0, frame = 0
190 @ frame_needed = 0, uses_anonymous_args = 0
191 @ link register save eliminated.
192 0000 C0E90012 strd r1, r2, [r0]
193 0004 C360 str r3, [r0, #12]
194 0006 DDE90023 ldrd r2, r3, [sp]
195 000a 80ED020A vstr.32 s0, [r0, #8]
196 000e C0E90423 strd r2, r3, [r0, #16]
197 0012 C0ED060A vstr.32 s1, [r0, #24]
198 0016 7047 bx lr
200 .section .text.arm_svm_rbf_predict_f32,"ax",%progbits
201 .align 1
202 .p2align 2,,3
203 .global arm_svm_rbf_predict_f32
204 .syntax unified
205 .thumb
206 .thumb_func
207 .fpu fpv4-sp-d16
209 arm_svm_rbf_predict_f32:
210 @ args = 0, pretend = 0, frame = 0
211 @ frame_needed = 0, uses_anonymous_args = 0
212 0000 2DE9F843 push {r3, r4, r5, r6, r7, r8, r9, lr}
213 0004 0368 ldr r3, [r0]
214 0006 0469 ldr r4, [r0, #16]
215 0008 2DED028B vpush.64 {d8}
216 000c 0646 mov r6, r0
217 000e 90ED028A vldr.32 s16, [r0, #8]
218 0012 9146 mov r9, r2
219 0014 1BB3 cbz r3, .L37
220 0016 8846 mov r8, r1
221 0018 0027 movs r7, #0
222 .L36:
223 001a 7568 ldr r5, [r6, #4]
224 001c 9FED187A vldr.32 s14, .L44
225 0020 65B1 cbz r5, .L40
226 0022 4346 mov r3, r8
227 0024 04EB850C add ip, r4, r5, lsl #2
228 .L38:
229 0028 F4EC016A vldmia.32 r4!, {s13}
230 002c F3EC017A vldmia.32 r3!, {s15}
231 0030 77EEE67A vsub.f32 s15, s15, s13
232 0034 6445 cmp r4, ip
233 0036 A7EEA77A vfma.f32 s14, s15, s15
234 003a F5D1 bne .L38
235 .L40:
236 003c F368 ldr r3, [r6, #12]
237 003e 96ED060A vldr.32 s0, [r6, #24]
238 0042 03EB8703 add r3, r3, r7, lsl #2
239 0046 20EE470A vnmul.f32 s0, s0, s14
ARM GAS /tmp/ccYN11sI.s page 5
240 004a D3ED008A vldr.32 s17, [r3]
241 004e FFF7FEFF bl expf
242 0052 3368 ldr r3, [r6]
243 0054 0137 adds r7, r7, #1
244 0056 BB42 cmp r3, r7
245 0058 A8EE808A vfma.f32 s16, s17, s0
246 005c DDD8 bhi .L36
247 .L37:
248 005e B5EEC08A vcmpe.f32 s16, #0
249 0062 BDEC028B vldm sp!, {d8}
250 0066 F1EE10FA vmrs APSR_nzcv, FPSCR
251 006a 7369 ldr r3, [r6, #20]
252 006c 8CBF ite hi
253 006e 0122 movhi r2, #1
254 0070 0022 movls r2, #0
255 0072 53F82230 ldr r3, [r3, r2, lsl #2]
256 0076 C9F80030 str r3, [r9]
257 007a BDE8F883 pop {r3, r4, r5, r6, r7, r8, r9, pc}
258 .L45:
259 007e 00BF .align 2
260 .L44:
261 0080 00000000 .word 0
263 .section .text.arm_svm_sigmoid_init_f32,"ax",%progbits
264 .align 1
265 .p2align 2,,3
266 .global arm_svm_sigmoid_init_f32
267 .syntax unified
268 .thumb
269 .thumb_func
270 .fpu fpv4-sp-d16
272 arm_svm_sigmoid_init_f32:
273 @ args = 8, pretend = 0, frame = 0
274 @ frame_needed = 0, uses_anonymous_args = 0
275 @ link register save eliminated.
276 0000 C0E90012 strd r1, r2, [r0]
277 0004 C360 str r3, [r0, #12]
278 0006 DDE90023 ldrd r2, r3, [sp]
279 000a 80ED020A vstr.32 s0, [r0, #8]
280 000e C0E90423 strd r2, r3, [r0, #16]
281 0012 C0ED060A vstr.32 s1, [r0, #24]
282 0016 80ED071A vstr.32 s2, [r0, #28]
283 001a 7047 bx lr
285 .section .text.arm_svm_sigmoid_predict_f32,"ax",%progbits
286 .align 1
287 .p2align 2,,3
288 .global arm_svm_sigmoid_predict_f32
289 .syntax unified
290 .thumb
291 .thumb_func
292 .fpu fpv4-sp-d16
294 arm_svm_sigmoid_predict_f32:
295 @ args = 0, pretend = 0, frame = 0
296 @ frame_needed = 0, uses_anonymous_args = 0
297 0000 2DE9F84F push {r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
298 0004 0568 ldr r5, [r0]
299 0006 0469 ldr r4, [r0, #16]
300 0008 2DED048B vpush.64 {d8, d9}
ARM GAS /tmp/ccYN11sI.s page 6
301 000c 0646 mov r6, r0
302 000e 90ED028A vldr.32 s16, [r0, #8]
303 0012 9246 mov r10, r2
304 0014 45B3 cbz r5, .L48
305 0016 D0F80480 ldr r8, [r0, #4]
306 001a D0F80CB0 ldr fp, [r0, #12]
307 001e 90ED079A vldr.32 s18, [r0, #28]
308 0022 D0ED068A vldr.32 s17, [r0, #24]
309 0026 0F46 mov r7, r1
310 0028 0BEB8505 add r5, fp, r5, lsl #2
311 002c 4FEA8809 lsl r9, r8, #2
312 .L49:
313 0030 DFED157A vldr.32 s15, .L58
314 0034 B8F1000F cmp r8, #0
315 0038 0AD0 beq .L52
316 003a 3B46 mov r3, r7
317 003c 04EB0902 add r2, r4, r9
318 .L50:
319 0040 B4EC017A vldmia.32 r4!, {s14}
320 0044 F3EC016A vldmia.32 r3!, {s13}
321 0048 9442 cmp r4, r2
322 004a E6EE877A vfma.f32 s15, s13, s14
323 004e F7D1 bne .L50
324 .L52:
325 0050 B0EE680A vmov.f32 s0, s17
326 0054 A7EE890A vfma.f32 s0, s15, s18
327 0058 FFF7FEFF bl tanhf
328 005c FBEC017A vldmia.32 fp!, {s15}
329 0060 5D45 cmp r5, fp
330 0062 A7EE808A vfma.f32 s16, s15, s0
331 0066 E3D1 bne .L49
332 .L48:
333 0068 B5EEC08A vcmpe.f32 s16, #0
334 006c BDEC048B vldm sp!, {d8-d9}
335 0070 F1EE10FA vmrs APSR_nzcv, FPSCR
336 0074 7369 ldr r3, [r6, #20]
337 0076 8CBF ite hi
338 0078 0122 movhi r2, #1
339 007a 0022 movls r2, #0
340 007c 53F82230 ldr r3, [r3, r2, lsl #2]
341 0080 CAF80030 str r3, [r10]
342 0084 BDE8F88F pop {r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
343 .L59:
344 .align 2
345 .L58:
346 0088 00000000 .word 0
348 .ident "GCC: (15:10.3-2021.07-4) 10.3.1 20210621 (release)"
ARM GAS /tmp/ccYN11sI.s page 7
DEFINED SYMBOLS
*ABS*:0000000000000000 SVMFunctions.c
/tmp/ccYN11sI.s:16 .text.arm_svm_linear_init_f32:0000000000000000 $t
/tmp/ccYN11sI.s:25 .text.arm_svm_linear_init_f32:0000000000000000 arm_svm_linear_init_f32
/tmp/ccYN11sI.s:37 .text.arm_svm_linear_predict_f32:0000000000000000 $t
/tmp/ccYN11sI.s:45 .text.arm_svm_linear_predict_f32:0000000000000000 arm_svm_linear_predict_f32
/tmp/ccYN11sI.s:86 .text.arm_svm_linear_predict_f32:0000000000000058 $d
/tmp/ccYN11sI.s:89 .text.arm_svm_polynomial_init_f32:0000000000000000 $t
/tmp/ccYN11sI.s:97 .text.arm_svm_polynomial_init_f32:0000000000000000 arm_svm_polynomial_init_f32
/tmp/ccYN11sI.s:113 .text.arm_svm_polynomial_predict_f32:0000000000000000 $t
/tmp/ccYN11sI.s:121 .text.arm_svm_polynomial_predict_f32:0000000000000000 arm_svm_polynomial_predict_f32
/tmp/ccYN11sI.s:177 .text.arm_svm_polynomial_predict_f32:0000000000000084 $d
/tmp/ccYN11sI.s:180 .text.arm_svm_rbf_init_f32:0000000000000000 $t
/tmp/ccYN11sI.s:188 .text.arm_svm_rbf_init_f32:0000000000000000 arm_svm_rbf_init_f32
/tmp/ccYN11sI.s:201 .text.arm_svm_rbf_predict_f32:0000000000000000 $t
/tmp/ccYN11sI.s:209 .text.arm_svm_rbf_predict_f32:0000000000000000 arm_svm_rbf_predict_f32
/tmp/ccYN11sI.s:261 .text.arm_svm_rbf_predict_f32:0000000000000080 $d
/tmp/ccYN11sI.s:264 .text.arm_svm_sigmoid_init_f32:0000000000000000 $t
/tmp/ccYN11sI.s:272 .text.arm_svm_sigmoid_init_f32:0000000000000000 arm_svm_sigmoid_init_f32
/tmp/ccYN11sI.s:286 .text.arm_svm_sigmoid_predict_f32:0000000000000000 $t
/tmp/ccYN11sI.s:294 .text.arm_svm_sigmoid_predict_f32:0000000000000000 arm_svm_sigmoid_predict_f32
/tmp/ccYN11sI.s:346 .text.arm_svm_sigmoid_predict_f32:0000000000000088 $d
UNDEFINED SYMBOLS
expf
tanhf

Binary file not shown.

View File

@@ -1,71 +0,0 @@
build/StatisticsFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/StatisticsFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_entropy_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_entropy_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_kullback_leibler_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_kullback_leibler_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_logsumexp_dot_prod_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_logsumexp_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_no_idx_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_rms_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_rms_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_rms_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_std_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_std_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_std_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_var_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_var_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_var_q31.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_entropy_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_entropy_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_kullback_leibler_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_kullback_leibler_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_logsumexp_dot_prod_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_logsumexp_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_max_no_idx_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_mean_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_min_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_power_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_rms_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_rms_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_rms_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_std_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_std_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_std_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_var_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_var_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/StatisticsFunctions/arm_var_q31.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,77 +0,0 @@
build/SupportFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/SupportFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_barycenter_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_bitonic_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/PrivateInclude/arm_sorting.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_bubble_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_heap_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_insertion_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_merge_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_merge_sort_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_quick_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_selection_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_sort_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_sort_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_spline_interp_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_spline_interp_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_weighted_sum_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_float.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q31_to_float.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q31_to_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q31_to_q7.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_float.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_q31.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_barycenter_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_bitonic_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/PrivateInclude/arm_sorting.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_bubble_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_copy_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_fill_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_heap_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_insertion_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_merge_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_merge_sort_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_quick_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_selection_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_sort_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_sort_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_spline_interp_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_spline_interp_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_weighted_sum_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_float.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q31_to_float.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q31_to_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q31_to_q7.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_float.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_q31.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,93 +0,0 @@
build/TransformFunctions.o: \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_bitreversal.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_bitreversal2.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_const_structs.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix8_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_init_f64.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_init_f32.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_init_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_init_q31.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q15.c \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q31.c
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_bitreversal.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_bitreversal2.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_const_structs.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_common_tables.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix2_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix4_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_cfft_radix8_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_dct4_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_fast_init_f64.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_init_f32.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_init_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_init_q31.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q15.c:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q31.c:

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -1,102 +0,0 @@
build/bassofono.o: Core/Src/bassofono.c Core/Inc/bassofono.h \
Core/Inc/main.h Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h \
Core/Inc/stm32g4xx_hal_conf.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h \
Drivers/CMSIS/Include/core_cm4.h Drivers/CMSIS/Include/cmsis_version.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Drivers/CMSIS/Include/mpu_armv7.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h \
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h Core/Inc/rx.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Core/Inc/tx.h Core/Inc/tx.h \
Core/Inc/rx.h Core/Inc/interface.h Core/Inc/si5351.h \
Core/Inc/i2c_eeprom.h Core/Inc/main.h Core/Inc/FIRFilterCode.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_cordic.h
Core/Inc/bassofono.h:
Core/Inc/main.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h:
Core/Inc/stm32g4xx_hal_conf.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h:
Drivers/CMSIS/Include/core_cm4.h:
Drivers/CMSIS/Include/cmsis_version.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Drivers/CMSIS/Include/mpu_armv7.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h:
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h:
Core/Inc/rx.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Core/Inc/tx.h:
Core/Inc/tx.h:
Core/Inc/rx.h:
Core/Inc/interface.h:
Core/Inc/si5351.h:
Core/Inc/i2c_eeprom.h:
Core/Inc/main.h:
Core/Inc/FIRFilterCode.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_cordic.h:

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,93 +0,0 @@
build/i2c_eeprom.o: Core/Src/i2c_eeprom.c \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h \
Core/Inc/stm32g4xx_hal_conf.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h \
Drivers/CMSIS/Include/core_cm4.h Drivers/CMSIS/Include/cmsis_version.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Drivers/CMSIS/Include/mpu_armv7.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h \
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h \
Core/Inc/i2c_eeprom.h Core/Inc/bassofono.h Core/Inc/main.h Core/Inc/rx.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Core/Inc/tx.h
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h:
Core/Inc/stm32g4xx_hal_conf.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h:
Drivers/CMSIS/Include/core_cm4.h:
Drivers/CMSIS/Include/cmsis_version.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Drivers/CMSIS/Include/mpu_armv7.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h:
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h:
Core/Inc/i2c_eeprom.h:
Core/Inc/bassofono.h:
Core/Inc/main.h:
Core/Inc/rx.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Core/Inc/tx.h:

View File

@@ -1,308 +0,0 @@
ARM GAS /tmp/ccrqOjI4.s page 1
1 .cpu cortex-m4
2 .eabi_attribute 27, 1
3 .eabi_attribute 28, 1
4 .eabi_attribute 20, 1
5 .eabi_attribute 21, 1
6 .eabi_attribute 23, 3
7 .eabi_attribute 24, 1
8 .eabi_attribute 25, 1
9 .eabi_attribute 26, 1
10 .eabi_attribute 30, 2
11 .eabi_attribute 34, 1
12 .eabi_attribute 18, 4
13 .file "i2c_eeprom.c"
14 .text
15 .section .text.i2c_eeprom_scrivi_32byte,"ax",%progbits
16 .align 1
17 .p2align 2,,3
18 .global i2c_eeprom_scrivi_32byte
19 .arch armv7e-m
20 .syntax unified
21 .thumb
22 .thumb_func
23 .fpu fpv4-sp-d16
25 i2c_eeprom_scrivi_32byte:
26 @ args = 0, pretend = 0, frame = 0
27 @ frame_needed = 0, uses_anonymous_args = 0
28 0000 70B5 push {r4, r5, r6, lr}
29 0002 0C4C ldr r4, .L6
30 0004 84B0 sub sp, sp, #16
31 0006 0546 mov r5, r0
32 0008 0E46 mov r6, r1
33 .L2:
34 000a 6423 movs r3, #100
35 000c 0322 movs r2, #3
36 000e 5021 movs r1, #80
37 0010 2046 mov r0, r4
38 0012 FFF7FEFF bl HAL_I2C_IsDeviceReady
39 0016 0028 cmp r0, #0
40 0018 F7D1 bne .L2
41 001a 6422 movs r2, #100
42 001c 2023 movs r3, #32
43 001e CDE90132 strd r3, r2, [sp, #4]
44 0022 0096 str r6, [sp]
45 0024 0223 movs r3, #2
46 0026 2A46 mov r2, r5
47 0028 5021 movs r1, #80
48 002a 0248 ldr r0, .L6
49 002c FFF7FEFF bl HAL_I2C_Mem_Write
50 0030 04B0 add sp, sp, #16
51 @ sp needed
52 0032 70BD pop {r4, r5, r6, pc}
53 .L7:
54 .align 2
55 .L6:
56 0034 00000000 .word hi2c1
58 .section .text.i2c_eeprom_leggi_32byte,"ax",%progbits
59 .align 1
ARM GAS /tmp/ccrqOjI4.s page 2
60 .p2align 2,,3
61 .global i2c_eeprom_leggi_32byte
62 .syntax unified
63 .thumb
64 .thumb_func
65 .fpu fpv4-sp-d16
67 i2c_eeprom_leggi_32byte:
68 @ args = 0, pretend = 0, frame = 0
69 @ frame_needed = 0, uses_anonymous_args = 0
70 0000 70B5 push {r4, r5, r6, lr}
71 0002 0C4C ldr r4, .L12
72 0004 84B0 sub sp, sp, #16
73 0006 0546 mov r5, r0
74 0008 0E46 mov r6, r1
75 .L9:
76 000a 6423 movs r3, #100
77 000c 0322 movs r2, #3
78 000e 5021 movs r1, #80
79 0010 2046 mov r0, r4
80 0012 FFF7FEFF bl HAL_I2C_IsDeviceReady
81 0016 0028 cmp r0, #0
82 0018 F7D1 bne .L9
83 001a 6422 movs r2, #100
84 001c 2023 movs r3, #32
85 001e CDE90132 strd r3, r2, [sp, #4]
86 0022 0096 str r6, [sp]
87 0024 0123 movs r3, #1
88 0026 2A46 mov r2, r5
89 0028 5021 movs r1, #80
90 002a 0248 ldr r0, .L12
91 002c FFF7FEFF bl HAL_I2C_Mem_Read
92 0030 04B0 add sp, sp, #16
93 @ sp needed
94 0032 70BD pop {r4, r5, r6, pc}
95 .L13:
96 .align 2
97 .L12:
98 0034 00000000 .word hi2c1
100 .section .text.salva_canale,"ax",%progbits
101 .align 1
102 .p2align 2,,3
103 .global salva_canale
104 .syntax unified
105 .thumb
106 .thumb_func
107 .fpu fpv4-sp-d16
109 salva_canale:
110 @ args = 0, pretend = 0, frame = 0
111 @ frame_needed = 0, uses_anonymous_args = 0
112 0000 70B5 push {r4, r5, r6, lr}
113 0002 0D4E ldr r6, .L18
114 0004 0D4C ldr r4, .L18+4
115 0006 84B0 sub sp, sp, #16
116 0008 4501 lsls r5, r0, #5
117 000a F6B2 uxtb r6, r6
118 .L15:
119 000c 6423 movs r3, #100
ARM GAS /tmp/ccrqOjI4.s page 3
120 000e 0322 movs r2, #3
121 0010 5021 movs r1, #80
122 0012 2046 mov r0, r4
123 0014 FFF7FEFF bl HAL_I2C_IsDeviceReady
124 0018 0028 cmp r0, #0
125 001a F7D1 bne .L15
126 001c 6422 movs r2, #100
127 001e 2023 movs r3, #32
128 0020 CDE90132 strd r3, r2, [sp, #4]
129 0024 0096 str r6, [sp]
130 0026 0223 movs r3, #2
131 0028 2A46 mov r2, r5
132 002a 5021 movs r1, #80
133 002c 0348 ldr r0, .L18+4
134 002e FFF7FEFF bl HAL_I2C_Mem_Write
135 0032 04B0 add sp, sp, #16
136 @ sp needed
137 0034 70BD pop {r4, r5, r6, pc}
138 .L19:
139 0036 00BF .align 2
140 .L18:
141 0038 00000000 .word canale
142 003c 00000000 .word hi2c1
144 .section .text.leggi_canale,"ax",%progbits
145 .align 1
146 .p2align 2,,3
147 .global leggi_canale
148 .syntax unified
149 .thumb
150 .thumb_func
151 .fpu fpv4-sp-d16
153 leggi_canale:
154 @ args = 0, pretend = 0, frame = 0
155 @ frame_needed = 0, uses_anonymous_args = 0
156 0000 70B5 push {r4, r5, r6, lr}
157 0002 0D4E ldr r6, .L24
158 0004 0D4C ldr r4, .L24+4
159 0006 84B0 sub sp, sp, #16
160 0008 4501 lsls r5, r0, #5
161 000a F6B2 uxtb r6, r6
162 .L21:
163 000c 6423 movs r3, #100
164 000e 0322 movs r2, #3
165 0010 5021 movs r1, #80
166 0012 2046 mov r0, r4
167 0014 FFF7FEFF bl HAL_I2C_IsDeviceReady
168 0018 0028 cmp r0, #0
169 001a F7D1 bne .L21
170 001c 6422 movs r2, #100
171 001e 2023 movs r3, #32
172 0020 CDE90132 strd r3, r2, [sp, #4]
173 0024 0096 str r6, [sp]
174 0026 0123 movs r3, #1
175 0028 2A46 mov r2, r5
176 002a 5021 movs r1, #80
177 002c 0348 ldr r0, .L24+4
178 002e FFF7FEFF bl HAL_I2C_Mem_Read
ARM GAS /tmp/ccrqOjI4.s page 4
179 0032 04B0 add sp, sp, #16
180 @ sp needed
181 0034 70BD pop {r4, r5, r6, pc}
182 .L25:
183 0036 00BF .align 2
184 .L24:
185 0038 00000000 .word canale
186 003c 00000000 .word hi2c1
188 .section .text.salva_stato,"ax",%progbits
189 .align 1
190 .p2align 2,,3
191 .global salva_stato
192 .syntax unified
193 .thumb
194 .thumb_func
195 .fpu fpv4-sp-d16
197 salva_stato:
198 @ args = 0, pretend = 0, frame = 0
199 @ frame_needed = 0, uses_anonymous_args = 0
200 0000 30B5 push {r4, r5, lr}
201 0002 0D4D ldr r5, .L30
202 0004 0D4C ldr r4, .L30+4
203 0006 85B0 sub sp, sp, #20
204 0008 EDB2 uxtb r5, r5
205 .L27:
206 000a 6423 movs r3, #100
207 000c 0322 movs r2, #3
208 000e 5021 movs r1, #80
209 0010 2046 mov r0, r4
210 0012 FFF7FEFF bl HAL_I2C_IsDeviceReady
211 0016 0028 cmp r0, #0
212 0018 F7D1 bne .L27
213 001a 6422 movs r2, #100
214 001c 2023 movs r3, #32
215 001e CDE90132 strd r3, r2, [sp, #4]
216 0022 0095 str r5, [sp]
217 0024 0223 movs r3, #2
218 0026 4FF47262 mov r2, #3872
219 002a 5021 movs r1, #80
220 002c 0348 ldr r0, .L30+4
221 002e FFF7FEFF bl HAL_I2C_Mem_Write
222 0032 05B0 add sp, sp, #20
223 @ sp needed
224 0034 30BD pop {r4, r5, pc}
225 .L31:
226 0036 00BF .align 2
227 .L30:
228 0038 00000000 .word stato
229 003c 00000000 .word hi2c1
231 .section .text.leggi_stato,"ax",%progbits
232 .align 1
233 .p2align 2,,3
234 .global leggi_stato
235 .syntax unified
236 .thumb
237 .thumb_func
238 .fpu fpv4-sp-d16
ARM GAS /tmp/ccrqOjI4.s page 5
240 leggi_stato:
241 @ args = 0, pretend = 0, frame = 0
242 @ frame_needed = 0, uses_anonymous_args = 0
243 0000 30B5 push {r4, r5, lr}
244 0002 0D4D ldr r5, .L36
245 0004 0D4C ldr r4, .L36+4
246 0006 85B0 sub sp, sp, #20
247 0008 EDB2 uxtb r5, r5
248 .L33:
249 000a 6423 movs r3, #100
250 000c 0322 movs r2, #3
251 000e 5021 movs r1, #80
252 0010 2046 mov r0, r4
253 0012 FFF7FEFF bl HAL_I2C_IsDeviceReady
254 0016 0028 cmp r0, #0
255 0018 F7D1 bne .L33
256 001a 6422 movs r2, #100
257 001c 2023 movs r3, #32
258 001e CDE90132 strd r3, r2, [sp, #4]
259 0022 0095 str r5, [sp]
260 0024 0123 movs r3, #1
261 0026 4FF47262 mov r2, #3872
262 002a 5021 movs r1, #80
263 002c 0348 ldr r0, .L36+4
264 002e FFF7FEFF bl HAL_I2C_Mem_Read
265 0032 05B0 add sp, sp, #20
266 @ sp needed
267 0034 30BD pop {r4, r5, pc}
268 .L37:
269 0036 00BF .align 2
270 .L36:
271 0038 00000000 .word stato
272 003c 00000000 .word hi2c1
274 .ident "GCC: (15:10.3-2021.07-4) 10.3.1 20210621 (release)"
ARM GAS /tmp/ccrqOjI4.s page 6
DEFINED SYMBOLS
*ABS*:0000000000000000 i2c_eeprom.c
/tmp/ccrqOjI4.s:16 .text.i2c_eeprom_scrivi_32byte:0000000000000000 $t
/tmp/ccrqOjI4.s:25 .text.i2c_eeprom_scrivi_32byte:0000000000000000 i2c_eeprom_scrivi_32byte
/tmp/ccrqOjI4.s:56 .text.i2c_eeprom_scrivi_32byte:0000000000000034 $d
/tmp/ccrqOjI4.s:59 .text.i2c_eeprom_leggi_32byte:0000000000000000 $t
/tmp/ccrqOjI4.s:67 .text.i2c_eeprom_leggi_32byte:0000000000000000 i2c_eeprom_leggi_32byte
/tmp/ccrqOjI4.s:98 .text.i2c_eeprom_leggi_32byte:0000000000000034 $d
/tmp/ccrqOjI4.s:101 .text.salva_canale:0000000000000000 $t
/tmp/ccrqOjI4.s:109 .text.salva_canale:0000000000000000 salva_canale
/tmp/ccrqOjI4.s:141 .text.salva_canale:0000000000000038 $d
/tmp/ccrqOjI4.s:145 .text.leggi_canale:0000000000000000 $t
/tmp/ccrqOjI4.s:153 .text.leggi_canale:0000000000000000 leggi_canale
/tmp/ccrqOjI4.s:185 .text.leggi_canale:0000000000000038 $d
/tmp/ccrqOjI4.s:189 .text.salva_stato:0000000000000000 $t
/tmp/ccrqOjI4.s:197 .text.salva_stato:0000000000000000 salva_stato
/tmp/ccrqOjI4.s:228 .text.salva_stato:0000000000000038 $d
/tmp/ccrqOjI4.s:232 .text.leggi_stato:0000000000000000 $t
/tmp/ccrqOjI4.s:240 .text.leggi_stato:0000000000000000 leggi_stato
/tmp/ccrqOjI4.s:271 .text.leggi_stato:0000000000000038 $d
UNDEFINED SYMBOLS
HAL_I2C_IsDeviceReady
HAL_I2C_Mem_Write
hi2c1
HAL_I2C_Mem_Read
canale
stato

Binary file not shown.

View File

@@ -1,93 +0,0 @@
build/interface.o: Core/Src/interface.c Core/Inc/interface.h \
Core/Inc/bassofono.h Core/Inc/main.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h \
Core/Inc/stm32g4xx_hal_conf.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h \
Drivers/CMSIS/Include/core_cm4.h Drivers/CMSIS/Include/cmsis_version.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Drivers/CMSIS/Include/mpu_armv7.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h \
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h Core/Inc/rx.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Core/Inc/tx.h
Core/Inc/interface.h:
Core/Inc/bassofono.h:
Core/Inc/main.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h:
Core/Inc/stm32g4xx_hal_conf.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h:
Drivers/CMSIS/Include/core_cm4.h:
Drivers/CMSIS/Include/cmsis_version.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Drivers/CMSIS/Include/mpu_armv7.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h:
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h:
Core/Inc/rx.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Core/Inc/tx.h:

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,97 +0,0 @@
build/main.o: Core/Src/main.c Core/Inc/main.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h \
Core/Inc/stm32g4xx_hal_conf.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h \
Drivers/CMSIS/Include/core_cm4.h Drivers/CMSIS/Include/cmsis_version.h \
Drivers/CMSIS/Include/cmsis_compiler.h Drivers/CMSIS/Include/cmsis_gcc.h \
Drivers/CMSIS/Include/mpu_armv7.h \
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h \
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h \
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h \
Core/Inc/bassofono.h Core/Inc/main.h Core/Inc/rx.h \
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h \
Drivers/CMSIS/Include/cmsis_compiler.h Core/Inc/tx.h \
Core/Inc/interface.h Core/Inc/si5351.h Core/Inc/i2c_eeprom.h
Core/Inc/main.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal.h:
Core/Inc/stm32g4xx_hal_conf.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g4xx.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/stm32g431xx.h:
Drivers/CMSIS/Include/core_cm4.h:
Drivers/CMSIS/Include/cmsis_version.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Drivers/CMSIS/Include/cmsis_gcc.h:
Drivers/CMSIS/Include/mpu_armv7.h:
Drivers/CMSIS/Device/ST/STM32G4xx/Include/system_stm32g4xx.h:
Drivers/STM32G4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_rcc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_gpio_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_adc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cordic.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_exti.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_flash_ramfunc.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_i2c_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_opamp_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_usb.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pcd_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_pwr_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_tim_ex.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart.h:
Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_uart_ex.h:
Core/Inc/bassofono.h:
Core/Inc/main.h:
Core/Inc/rx.h:
Middlewares/Third_Party/ARM_CMSIS/CMSIS/DSP/Include/arm_math.h:
Drivers/CMSIS/Include/cmsis_compiler.h:
Core/Inc/tx.h:
Core/Inc/interface.h:
Core/Inc/si5351.h:
Core/Inc/i2c_eeprom.h:

File diff suppressed because it is too large Load Diff

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More