![]() |
ISSDK
1.7
IoT Sensing Software Development Kit
|
Defines control sub-system. More...
#include "fsl_debug_console.h"
#include "board.h"
#include "pin_mux.h"
#include "fsl_uart.h"
#include "fsl_port.h"
#include "sensor_fusion.h"
#include "control.h"
Go to the source code of this file.
Macros | |
#define | F_USE_WIRELESS_UART 0x0001 |
0x0001 to include, 0x0000 otherwise More... | |
#define | F_USE_WIRED_UART 0x0002 |
0x0002 to include, 0x0000 otherwise More... | |
#define | CONTROL_BAUDRATE 115200 |
Baudrate to be used for serial communications. More... | |
Functions | |
void | myUART_WriteByte (UART_Type *base, uint8_t data) |
int8_t | writeControlPort (ControlSubsystem *pComm, uint8_t buffer[], uint16_t nbytes) |
int8_t | writeWirelessPort (uint8_t buffer[], uint16_t nbytes) |
void | WIRELESS_UART_IRQHandler (void) |
void | BlueRadios_Init (void) |
void | echo (uint8_t data) |
void | WIRED_UART_IRQHandler (void) |
int8_t | initializeControlPort (ControlSubsystem *pComm) |
Initialize the control subsystem and all related hardware. More... | |
Variables | |
uart_handle_t | wired_uartHandle |
uart_handle_t | wireless_uartHandle |
uint8_t | sUARTOutputBuffer [256] |
main output buffer defined in control.c More... | |
SensorFusionGlobals | sfg |
This is the primary sensor fusion data structure. More... | |
Defines control sub-system.
This file contains a UART implementation of the control subsystem. The command interpreter and streaming functions are contained in two separate files. So you can easily swap those out with only minor changes here.
Definition in file control.c.
#define CONTROL_BAUDRATE 115200 |
Baudrate to be used for serial communications.
Definition at line 57 of file control.c.
Referenced by initializeControlPort().
#define F_USE_WIRED_UART 0x0002 |
#define F_USE_WIRELESS_UART 0x0001 |
void BlueRadios_Init | ( | void | ) |
Used to initialize the Blue Radios Bluetooth module found on the FRDM-FXS-MULT2-B sensor shield from NXP.
Definition at line 136 of file control.c.
Referenced by initializeControlPort().
void echo | ( | uint8_t | data | ) |
Definition at line 153 of file control.c.
References WIRED_UART.
int8_t initializeControlPort | ( | ControlSubsystem * | pComm | ) |
void myUART_WriteByte | ( | UART_Type * | base, |
uint8_t | data | ||
) |
Definition at line 72 of file control.c.
Referenced by writeControlPort(), and writeWirelessPort().
void WIRED_UART_IRQHandler | ( | void | ) |
Definition at line 162 of file control.c.
References data, DecodeCommandBytes(), RECEIVING_WIRED, SensorFusionGlobals::setStatus, WIRED_UART, and wired_uartHandle.
void WIRELESS_UART_IRQHandler | ( | void | ) |
Definition at line 114 of file control.c.
References data, DecodeCommandBytes(), RECEIVING_WIRELESS, SensorFusionGlobals::setStatus, WIRELESS_UART, and wireless_uartHandle.
int8_t writeControlPort | ( | ControlSubsystem * | pComm, |
uint8_t | buffer[], | ||
uint16_t | nbytes | ||
) |
Definition at line 83 of file control.c.
References myUART_WriteByte(), WIRED_UART, and WIRELESS_UART.
Referenced by initializeControlPort().
int8_t writeWirelessPort | ( | uint8_t | buffer[], |
uint16_t | nbytes | ||
) |
Definition at line 103 of file control.c.
References myUART_WriteByte(), and WIRELESS_UART.
Referenced by BlueRadios_Init().
This is the primary sensor fusion data structure.
Definition at line 101 of file orientaion_application_baremetal_agm01.c.
uint8_t sUARTOutputBuffer[256] |
main output buffer defined in control.c
Definition at line 63 of file control.c.
Referenced by BlueRadios_Init(), and main().
uart_handle_t wired_uartHandle |
Definition at line 59 of file control.c.
Referenced by WIRED_UART_IRQHandler().
uart_handle_t wireless_uartHandle |
Definition at line 60 of file control.c.
Referenced by WIRELESS_UART_IRQHandler().