Changeset - 779c7da65f38
[Not reviewed]
default
0 2 0
Ethan Zonca - 9 years ago 2016-10-11 21:21:51
ez@ethanzonca.com
Fix deinitting things that aren't initted
2 files changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/gps.c
Show inline comments
 
@@ -21,6 +21,13 @@ static uint8_t _gps_verify_checksum(uint
 
// Poll for fix data from the GPS and update the internal structure
 
void gps_update_data(void)
 
{
 
	// Error!
 
	if(!gpson)
 
	{
 
		led_blink(5);
 
		return;
 
	}
 

	
 
    // Construct the request to the GPS
 
    uint8_t request[8] = {0xB5, 0x62, 0x01, 0x07, 0x00, 0x00, 0xFF, 0xFF};
 

	
src/uart.c
Show inline comments
 
@@ -90,8 +90,8 @@ void uart_deinit(void)
 
{
 
    if(uart_initted == 1)
 
    {
 
        HAL_DMA_DeInit(&hdma_usart1_rx);
 
        HAL_DMA_DeInit(&hdma_usart1_tx);
 
        //HAL_DMA_DeInit(&hdma_usart1_rx);
 
        //HAL_DMA_DeInit(&hdma_usart1_tx);
 
        HAL_UART_DeInit(&huart1);
 
        uart_initted = 0;
 
    }
0 comments (0 inline, 0 general)