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
 
@@ -18,12 +18,19 @@ static void gps_ubx_checksum(uint8_t* da
 
static uint8_t _gps_verify_checksum(uint8_t* data, uint8_t len);
 

	
 

	
 
// 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};
 

	
 

	
 
    volatile uint8_t check_a = 0;
 
    volatile uint8_t check_b = 0;
src/uart.c
Show inline comments
 
@@ -87,14 +87,14 @@ void uart_init(void)
 
}
 
 
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;
 
    }
 
}
 
 
UART_HandleTypeDef* uart_gethandle(void)
0 comments (0 inline, 0 general)