Update Firmware with features:
* Shellmatta implemented using UART * Version string implemented * Increased heap size * Add shellmatta printf support
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include <string.h>
|
||||
#include <adc-meas.h>
|
||||
#include <clock-enable-manager.h>
|
||||
#include <uart/uart.h>
|
||||
#include <shell.h>
|
||||
|
||||
static void setup_nvic_priorities()
|
||||
{
|
||||
@@ -27,7 +29,12 @@ static void setup_nvic_priorities()
|
||||
static float pt1000_value;
|
||||
static volatile int pt1000_value_status;
|
||||
|
||||
int main() {
|
||||
int main()
|
||||
{
|
||||
const char *uart_input;
|
||||
size_t uart_input_len;
|
||||
shellmatta_handle_t shell_handle;
|
||||
|
||||
rcc_manager_enable_clock(&RCC->AHB1ENR, BITMASK_TO_BITNO(RCC_AHB1ENR_GPIOBEN));
|
||||
|
||||
__DSB();
|
||||
@@ -40,8 +47,18 @@ int main() {
|
||||
//setup_dma(&adc_results, 3);
|
||||
adc_pt1000_setup_meas();
|
||||
|
||||
uart_init_with_dma();
|
||||
|
||||
shell_handle = shell_init();
|
||||
|
||||
while(1) {
|
||||
pt1000_value_status = adc_pt1000_get_current_resistance(&pt1000_value);
|
||||
|
||||
if (uart_receive_data_with_dma(&uart_input, &uart_input_len) >= 0) {
|
||||
shell_handle_input(shell_handle, uart_input, uart_input_len);
|
||||
}
|
||||
//systick_wait_ms(300);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user