ADI iSensor FX3 Firmware  v2.9.4-pub
Firmware for the Analog Devices EVAL-ADIS-FX3 IMU Evaluation Platform. This firmware can be compiled using the Cypress EZ USB Suite IDE
AppThread.h
Go to the documentation of this file.
1 
19 #ifndef APP_THREAD_H
20 #define APP_THREAD_H
21 
22 /* Include the main header file */
23 #include "main.h"
24 
25 /* Function definitions */
26 void AdiAppThreadEntry(uint32_t input);
27 
29 #define APPTHREAD_STACK (0x0800)
30 
32 #define APPTHREAD_PRIORITY (8)
33 
34 /*
35  * ADI Event Handler Flag Definitions
36  */
37 
39 #define ADI_KILL_THREAD_EARLY (1 << 0)
40 
42 #define ADI_RT_STREAM_START (1 << 1)
43 
45 #define ADI_RT_STREAM_STOP (1 << 2)
46 
48 #define ADI_RT_STREAM_DONE (1 << 3)
49 
51 #define ADI_RT_STREAM_ENABLE (1 << 4)
52 
54 #define ADI_GENERIC_STREAM_START (1 << 5)
55 
57 #define ADI_GENERIC_STREAM_STOP (1 << 6)
58 
60 #define ADI_GENERIC_STREAM_DONE (1 << 7)
61 
63 #define ADI_GENERIC_STREAM_ENABLE (1 << 8)
64 
66 #define ADI_BURST_STREAM_START (1 << 9)
67 
69 #define ADI_BURST_STREAM_STOP (1 << 10)
70 
72 #define ADI_BURST_STREAM_DONE (1 << 11)
73 
75 #define ADI_BURST_STREAM_ENABLE (1 << 12)
76 
78 #define ADI_TRANSFER_STREAM_START (1 << 13)
79 
81 #define ADI_TRANSFER_STREAM_STOP (1 << 14)
82 
84 #define ADI_TRANSFER_STREAM_DONE (1 << 15)
85 
87 #define ADI_TRANSFER_STREAM_ENABLE (1 << 16)
88 
90 #define ADI_I2C_STREAM_START (1 << 17)
91 
93 #define ADI_I2C_STREAM_STOP (1 << 18)
94 
96 #define ADI_I2C_STREAM_DONE (1 << 19)
97 
99 #define ADI_I2C_STREAM_ENABLE (1 << 20)
100 
101 #endif
ADI_TRANSFER_STREAM_STOP
#define ADI_TRANSFER_STREAM_STOP
Definition: AppThread.h:81
AdiAppThreadEntry
void AdiAppThreadEntry(uint32_t input)
This is the entry point for the primary iSensors firmware application thread.
Definition: AppThread.c:272
ADI_GENERIC_STREAM_STOP
#define ADI_GENERIC_STREAM_STOP
Definition: AppThread.h:57
AdiBurstStreamFinished
CyU3PReturnStatus_t AdiBurstStreamFinished()
Cleans up resources allocated for a IMU burst stream.
Definition: StreamFunctions.c:890
ADI_I2C_STREAM_START
#define ADI_I2C_STREAM_START
Definition: AppThread.h:90
AdiRealTimeStreamStart
CyU3PReturnStatus_t AdiRealTimeStreamStart()
Starts a real time stream for ADcmXLx021 DUTs.
Definition: StreamFunctions.c:434
ADI_RT_STREAM_STOP
#define ADI_RT_STREAM_STOP
Definition: AppThread.h:45
AdiGenericStreamFinished
CyU3PReturnStatus_t AdiGenericStreamFinished()
This function cleans up after a generic stream and notifies the host that the cancel operation was su...
Definition: StreamFunctions.c:1068
AdiDebugInit
static void AdiDebugInit()
This function initializes the UART controller to send debug messages.
Definition: AppThread.c:42
ADI_BURST_STREAM_DONE
#define ADI_BURST_STREAM_DONE
Definition: AppThread.h:72
ADI_TRANSFER_STREAM_DONE
#define ADI_TRANSFER_STREAM_DONE
Definition: AppThread.h:84
ADI_TRANSFER_STREAM_START
#define ADI_TRANSFER_STREAM_START
Definition: AppThread.h:78
EventHandler
CyU3PEvent EventHandler
Definition: main.c:60
ADI_I2C_STREAM_DONE
#define ADI_I2C_STREAM_DONE
Definition: AppThread.h:96
EFUSE_DIE_ID
#define EFUSE_DIE_ID
Definition: main.h:416
AdiControlEndpointHandler
CyBool_t AdiControlEndpointHandler(uint32_t setupdat0, uint32_t setupdat1)
This function handles events generated by the control endpoint. All vendor requests are handled in th...
Definition: main.c:215
AdiBurstStreamStart
CyU3PReturnStatus_t AdiBurstStreamStart()
Starts a burst stream for IMU products.
Definition: StreamFunctions.c:721
ADI_BURST_STREAM_STOP
#define ADI_BURST_STREAM_STOP
Definition: AppThread.h:69
AdiStopAnyDataStream
CyU3PReturnStatus_t AdiStopAnyDataStream()
This function sets a flag to notify the streaming thread that the user requested to cancel streaming.
Definition: StreamFunctions.c:73
serial_number
char serial_number[]
AdiI2CStreamStart
CyU3PReturnStatus_t AdiI2CStreamStart()
Starts an I2C read stream.
Definition: StreamFunctions.c:139
UNUSED
#define UNUSED(x)
Definition: main.h:447
ADI_RT_STREAM_START
#define ADI_RT_STREAM_START
Definition: AppThread.h:42
AdiAppInit
static void AdiAppInit()
This function initializes the USB module and attaches core event handlers.
Definition: AppThread.c:107
ADI_GENERIC_STREAM_DONE
#define ADI_GENERIC_STREAM_DONE
Definition: AppThread.h:60
AdiTransferStreamFinished
CyU3PReturnStatus_t AdiTransferStreamFinished()
Cleans up a protocol agnostic transfer stream.
Definition: StreamFunctions.c:414
AdiI2CStreamFinished
CyU3PReturnStatus_t AdiI2CStreamFinished()
Cleans up an I2C read stream.
Definition: StreamFunctions.c:220
AdiTransferStreamStart
CyU3PReturnStatus_t AdiTransferStreamStart()
Starts a protocol agnostic SPI transfer stream.
Definition: StreamFunctions.c:256
AdiUSBEventHandler
void AdiUSBEventHandler(CyU3PUsbEventType_t evtype, uint16_t evdata)
This is a callback function to handle generic USB events.
Definition: main.c:698
main.h
Main header file for the Analog Devices iSensor FX3 Demonstration Platform firmware.
ADI_I2C_STREAM_STOP
#define ADI_I2C_STREAM_STOP
Definition: AppThread.h:93
ADI_RT_STREAM_DONE
#define ADI_RT_STREAM_DONE
Definition: AppThread.h:48
AdiAppErrorHandler
void AdiAppErrorHandler(CyU3PReturnStatus_t status)
This function handles critical errors generated by the ADI application.
Definition: main.c:801
AdiRealTimeStreamFinished
CyU3PReturnStatus_t AdiRealTimeStreamFinished()
This function cleans up resources allocated for a real time stream.
Definition: StreamFunctions.c:647
ADI_GENERIC_STREAM_START
#define ADI_GENERIC_STREAM_START
Definition: AppThread.h:54
AppThread_c
@ AppThread_c
Definition: ErrorLog.h:45
AdiLPMRequestHandler
CyBool_t AdiLPMRequestHandler(CyU3PUsbLinkPowerMode link_mode)
This is a callback function to handle Link Power Management (LPM) requests.
Definition: main.c:736
ADI_BURST_STREAM_START
#define ADI_BURST_STREAM_START
Definition: AppThread.h:66
AppThread.h
Header file for all the primary application thread functions.
AdiAppThreadEntry
void AdiAppThreadEntry(uint32_t input)
This is the entry point for the primary iSensors firmware application thread.
Definition: AppThread.c:272
AdiLogError
void AdiLogError(FileIdentifier File, uint32_t Line, uint32_t ErrorCode)
Logs a firmware error to flash memory for later examination.
Definition: ErrorLog.c:51
AdiGenericStreamStart
CyU3PReturnStatus_t AdiGenericStreamStart()
Starts a register read/write stream, with options to trigger on a data ready.
Definition: StreamFunctions.c:949