uart.h: Add uart_get_baud/uart_set_baud functions, change default baud rate from 74906 to 115200

This commit is contained in:
Angus Gratton 2015-10-06 17:06:56 +11:00
parent 707d0ed981
commit 3ceadfc0a6
14 changed files with 18 additions and 42 deletions

View file

@ -3,7 +3,6 @@
* This sample code is in the public domain.
*/
#include "espressif/esp_common.h"
#include "espressif/sdk_private.h"
#include "FreeRTOS.h"
#include "task.h"
@ -83,22 +82,9 @@ void bmp180_task(void *pvParameters)
}
}
// Setup HW
void user_setup(void)
{
// Set UART Parameter
sdk_uart_div_modify(0, UART_CLK_FREQ / 115200);
// Give the UART some time to settle
sdk_os_delay_us(500);
}
void user_init(void)
{
// Setup HW
user_setup();
// Just some infomations
// Just some informations
printf("\n");
printf("SDK version : %s\n", sdk_system_get_sdk_version());
printf("GIT version : %s\n", GITSHORTREV);