![]() |
ISSDK
1.8
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_lpsci.h"
#include "fsl_port.h"
#include "sensor_fusion.h"
#include "control.h"
Go to the source code of this file.
Macros | |
#define | CONTROL_BAUDRATE 115200 |
Baudrate to be used for serial communications. More... | |
Functions | |
void | myUART_WriteByte (UART0_Type *base, uint8_t data) |
int8_t | writeControlPort (ControlSubsystem *pComm, uint8_t buffer[], uint16_t nbytes) |
void | BlueRadios_Init (void) |
void | CONTROL_UART_IRQHandler (void) |
int8_t | initializeControlPort (ControlSubsystem *pComm) |
Initialize the control subsystem and all related hardware. More... | |
Variables | |
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 Low power UART implementation of the control subsystem. This version is targeted specificially at FRDM-KL25Z, which utilizes a low power uart to drive both the OpenSDA and shield UART connections for FRDM-MULT2-B Bluetooth module.
The low power uart utilizes a slightly different interface within KSDK, hence this adaptation.
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_lpsci.c.
#define CONTROL_BAUDRATE 115200 |
Baudrate to be used for serial communications.
Definition at line 32 of file control_lpsci.c.
Referenced by initializeControlPort().
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 68 of file control_lpsci.c.
References sUARTOutputBuffer, writeControlPort(), and writeWirelessPort().
void CONTROL_UART_IRQHandler | ( | void | ) |
Definition at line 83 of file control_lpsci.c.
References CONTROL_UART, data, DecodeCommandBytes(), RECEIVING_WIRED, and SensorFusionGlobals::setStatus.
int8_t initializeControlPort | ( | ControlSubsystem * | pComm | ) |
Initialize the control subsystem and all related hardware.
Call this once to initialize structures, ports, etc.
pComm | pointer to the control subystem structure |
Definition at line 99 of file control_lpsci.c.
References ControlSubsystem::AccelCalPacketOn, ControlSubsystem::AltPacketOn, ControlSubsystem::AngularVelocityPacketOn, BlueRadios_Init(), CONTROL_BAUDRATE, CONTROL_UART, CONTROL_UART_CLKSRC, CONTROL_UART_IRQn, CONTROL_UART_MUX, CONTROL_UART_PORT, CONTROL_UART_PORT_CLKEN, CONTROL_UART_RX_PIN, CONTROL_UART_TX_PIN, CreateAndSendPackets(), ControlSubsystem::DebugPacketOn, ControlSubsystem::DefaultQuaternionPacketType, Q3, ControlSubsystem::QuaternionPacketType, ControlSubsystem::RPCPacketOn, ControlSubsystem::stream, WIRED_UART, WIRED_UART_CLKSRC, WIRED_UART_IRQn, WIRED_UART_MUX, WIRED_UART_PORT, WIRED_UART_PORT_CLKEN, WIRED_UART_RX_PIN, WIRED_UART_TX_PIN, WIRELESS_UART, WIRELESS_UART_CLKSRC, WIRELESS_UART_IRQn, WIRELESS_UART_MUX, WIRELESS_UART_PORT, WIRELESS_UART_PORT_CLKEN, WIRELESS_UART_RX_PIN, WIRELESS_UART_TX_PIN, ControlSubsystem::write, and writeControlPort().
void myUART_WriteByte | ( | UART0_Type * | base, |
uint8_t | data | ||
) |
Definition at line 44 of file control_lpsci.c.
Referenced by writeControlPort().
int8_t writeControlPort | ( | ControlSubsystem * | pComm, |
uint8_t | buffer[], | ||
uint16_t | nbytes | ||
) |
Definition at line 55 of file control_lpsci.c.
References CONTROL_UART, and myUART_WriteByte().
Referenced by BlueRadios_Init(), and initializeControlPort().
This is the primary sensor fusion data structure.
Definition at line 75 of file orientaion_application_baremetal_agm01.c.
Referenced by FXOS8700_Init(), and initializeSensors().
uint8_t sUARTOutputBuffer[256] |
main output buffer defined in control.c
Definition at line 35 of file control_lpsci.c.
Referenced by BlueRadios_Init().