ISSDK  1.8
IoT Sensing Software Development Kit
Macros | Functions | Variables
control_lpsci.c File Reference

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"
Include dependency graph for control_lpsci.c:

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...
 

Detailed Description

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.

Macro Definition Documentation

◆ CONTROL_BAUDRATE

#define CONTROL_BAUDRATE   115200

Baudrate to be used for serial communications.

Definition at line 32 of file control_lpsci.c.

Referenced by initializeControlPort().

Function Documentation

◆ BlueRadios_Init()

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().

Here is the call graph for this function:

◆ CONTROL_UART_IRQHandler()

void CONTROL_UART_IRQHandler ( void  )

Definition at line 83 of file control_lpsci.c.

References CONTROL_UART, data, DecodeCommandBytes(), RECEIVING_WIRED, and SensorFusionGlobals::setStatus.

Here is the call graph for this function:

◆ initializeControlPort()

int8_t initializeControlPort ( ControlSubsystem pComm)

◆ myUART_WriteByte()

void myUART_WriteByte ( UART0_Type *  base,
uint8_t  data 
)

Definition at line 44 of file control_lpsci.c.

Referenced by writeControlPort().

Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sfg

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().

◆ sUARTOutputBuffer

uint8_t sUARTOutputBuffer[256]

main output buffer defined in control.c

Definition at line 35 of file control_lpsci.c.

Referenced by BlueRadios_Init().