diff --git a/workspace/10_ADC_continuous_conversion/10_ADC_Continuous_Conversion.launch b/workspace/10_ADC_continuous_conversion/10_ADC_Continuous_Conversion.launch new file mode 100644 index 0000000..41170c5 --- /dev/null +++ b/workspace/10_ADC_continuous_conversion/10_ADC_Continuous_Conversion.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/10_ADC_continuous_conversion/Src/adc.c b/workspace/10_ADC_continuous_conversion/Src/adc.c index 01bcf54..6cb450a 100644 --- a/workspace/10_ADC_continuous_conversion/Src/adc.c +++ b/workspace/10_ADC_continuous_conversion/Src/adc.c @@ -59,15 +59,3 @@ uint32_t adc_get_data(void) { // Read results return (ADC1->DR); } - - - - - - - - - - - - diff --git a/workspace/11_ADC_single_conversion/11_ADC_Single_Conversion.launch b/workspace/11_ADC_single_conversion/11_ADC_Single_Conversion.launch new file mode 100644 index 0000000..300eeb6 --- /dev/null +++ b/workspace/11_ADC_single_conversion/11_ADC_Single_Conversion.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/11_ADC_single_conversion/Src/main.c b/workspace/11_ADC_single_conversion/Src/main.c index 7c6e9a4..43f8590 100644 --- a/workspace/11_ADC_single_conversion/Src/main.c +++ b/workspace/11_ADC_single_conversion/Src/main.c @@ -28,29 +28,3 @@ int main(void) { } - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/12_SysTick/12_SysTick.launch b/workspace/12_SysTick/12_SysTick.launch new file mode 100644 index 0000000..e4d2a7a --- /dev/null +++ b/workspace/12_SysTick/12_SysTick.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/12_SysTick/Src/main.c b/workspace/12_SysTick/Src/main.c index eb9c3e8..2c9d4f3 100644 --- a/workspace/12_SysTick/Src/main.c +++ b/workspace/12_SysTick/Src/main.c @@ -20,30 +20,3 @@ int main(void) { } } - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/13_Timer/13_Timer.launch b/workspace/13_Timer/13_Timer.launch new file mode 100644 index 0000000..38c88f6 --- /dev/null +++ b/workspace/13_Timer/13_Timer.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/13_Timer/Src/main.c b/workspace/13_Timer/Src/main.c index 7abd931..68c9c7f 100644 --- a/workspace/13_Timer/Src/main.c +++ b/workspace/13_Timer/Src/main.c @@ -27,29 +27,3 @@ int main(void) { } - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/14_Input_Interrupt/14_Input_Interrupt.launch b/workspace/14_Input_Interrupt/14_Input_Interrupt.launch new file mode 100644 index 0000000..f1a0ee3 --- /dev/null +++ b/workspace/14_Input_Interrupt/14_Input_Interrupt.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/14_Input_Interrupt/Src/main.c b/workspace/14_Input_Interrupt/Src/main.c index b93b95e..2eec28d 100644 --- a/workspace/14_Input_Interrupt/Src/main.c +++ b/workspace/14_Input_Interrupt/Src/main.c @@ -10,7 +10,7 @@ #include "timer.h" #include "exti.h" -// Why static? + static void user_btn_callback(void); int main(void) { @@ -46,25 +46,3 @@ void EXTI15_10_IRQHandler(void) { } } - - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/15_Timer_Interrupt/15_Timer_Interrupt.launch b/workspace/15_Timer_Interrupt/15_Timer_Interrupt.launch new file mode 100644 index 0000000..743472f --- /dev/null +++ b/workspace/15_Timer_Interrupt/15_Timer_Interrupt.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/15_Timer_Interrupt/Src/main.c b/workspace/15_Timer_Interrupt/Src/main.c index 93d37b9..d358028 100644 --- a/workspace/15_Timer_Interrupt/Src/main.c +++ b/workspace/15_Timer_Interrupt/Src/main.c @@ -46,25 +46,3 @@ void TIM1_UP_TIM10_IRQHandler(void) { } } - - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/16_SysTick_Interrupt/16_SysTick_Interrupt.launch b/workspace/16_SysTick_Interrupt/16_SysTick_Interrupt.launch new file mode 100644 index 0000000..208c423 --- /dev/null +++ b/workspace/16_SysTick_Interrupt/16_SysTick_Interrupt.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/16_SysTick_Interrupt/Src/main.c b/workspace/16_SysTick_Interrupt/Src/main.c index 187e46b..8621262 100644 --- a/workspace/16_SysTick_Interrupt/Src/main.c +++ b/workspace/16_SysTick_Interrupt/Src/main.c @@ -10,7 +10,7 @@ #include "timer.h" #include "exti.h" -// Why static? + static void systick_callback(void); int main(void) { @@ -35,25 +35,3 @@ void SysTick_Handler(void) { // Do something systick_callback(); } - - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/17_ADC_Interrupt/17_ADC_Interrupt.launch b/workspace/17_ADC_Interrupt/17_ADC_Interrupt.launch new file mode 100644 index 0000000..2cdf08c --- /dev/null +++ b/workspace/17_ADC_Interrupt/17_ADC_Interrupt.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/17_ADC_Interrupt/Src/main.c b/workspace/17_ADC_Interrupt/Src/main.c index 61ae061..f268cd8 100644 --- a/workspace/17_ADC_Interrupt/Src/main.c +++ b/workspace/17_ADC_Interrupt/Src/main.c @@ -32,6 +32,7 @@ static void adc_conv_cmplt_callback(void) { } + void ADC_IRQHandler(void) { // Check if end-of-conversion interrupt occurred @@ -46,23 +47,3 @@ void ADC_IRQHandler(void) { } - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/18_uart_tx_interrupt/18_UART_TX_Interrupt.launch b/workspace/18_uart_tx_interrupt/18_UART_TX_Interrupt.launch new file mode 100644 index 0000000..416eaa4 --- /dev/null +++ b/workspace/18_uart_tx_interrupt/18_UART_TX_Interrupt.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/18_uart_tx_interrupt/Src/main.c b/workspace/18_uart_tx_interrupt/Src/main.c index 824e241..880453e 100644 --- a/workspace/18_uart_tx_interrupt/Src/main.c +++ b/workspace/18_uart_tx_interrupt/Src/main.c @@ -10,7 +10,7 @@ #include "timer.h" #include "exti.h" -// Why static? + static void uart_tx_callback(void); int sensor_value; @@ -42,24 +42,3 @@ void USART3_IRQHandler(void) { } } - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/19_uart_rx_interrupt/19_UART_RX_Interrupt.launch b/workspace/19_uart_rx_interrupt/19_UART_RX_Interrupt.launch new file mode 100644 index 0000000..ecbffbf --- /dev/null +++ b/workspace/19_uart_rx_interrupt/19_UART_RX_Interrupt.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/19_uart_rx_interrupt/Src/main.c b/workspace/19_uart_rx_interrupt/Src/main.c index 1f25ca2..8d07c58 100644 --- a/workspace/19_uart_rx_interrupt/Src/main.c +++ b/workspace/19_uart_rx_interrupt/Src/main.c @@ -61,24 +61,3 @@ void USART3_IRQHandler(void) { uart_rx_callback(); } } - - - - - - - - - - - - - - - - - - - - - diff --git a/workspace/20_SPI/20_SPI.launch b/workspace/20_SPI/20_SPI.launch new file mode 100644 index 0000000..d222f98 --- /dev/null +++ b/workspace/20_SPI/20_SPI.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/20_SPI/Src/main.c b/workspace/20_SPI/Src/main.c index ad8a89e..9f0052d 100644 --- a/workspace/20_SPI/Src/main.c +++ b/workspace/20_SPI/Src/main.c @@ -45,6 +45,7 @@ void spi1_callback(void) { *spidr = tx_buff[tx_idx++]; } + void SPI1_IRQHandler(void) { // Check TXE flag value in SR register @@ -55,10 +56,12 @@ void SPI1_IRQHandler(void) { } + void spi3_callback(void) { rx_buff[rx_idx++] = SPI3->DR; } + void SPI3_IRQHandler(void) { // Check RXNE flag value in SR register @@ -69,17 +72,3 @@ void SPI3_IRQHandler(void) { } - - - - - - - - - - - - - - diff --git a/workspace/21_I2C/21_I2C.launch b/workspace/21_I2C/21_I2C.launch new file mode 100644 index 0000000..8f98155 --- /dev/null +++ b/workspace/21_I2C/21_I2C.launch @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace/21_I2C/Src/main.c b/workspace/21_I2C/Src/main.c index 07d8fab..0d5d984 100644 --- a/workspace/21_I2C/Src/main.c +++ b/workspace/21_I2C/Src/main.c @@ -28,7 +28,6 @@ volatile uint8_t rx_idx = 0; static void handle_i2c_master(void); // Connect jumper - // SCL on PB.10 ----- SCL on PB.6 // SDA on PB.11 ----- SDA on PB.9 @@ -48,7 +47,7 @@ int main(void) { static void handle_i2c_master(void) { - // Set slave address + // Set slave address I2C1->CR2 |= SLAVE_OWN_ADDRESS; // Set 7-bits address mode @@ -96,6 +95,7 @@ void slave_complete_callback(void) { printf("Transmission complete...\n\r"); } + void I2C2_EV_IRQHandler(void) { // Check ADDR flag value in ISR register @@ -133,18 +133,3 @@ void I2C2_EV_IRQHandler(void) { } } - - - - - - - - - - - - - - -