minipix_uart_interface
A library and examples for the MiniPIX UART interface
|
#include <mui.h>
Functions | |
void | mui_initialize (MUI_Handler_t *mui_handler) |
The "constructor" of the MUI handler. Should be called by the user just after allocating it. More... | |
void | mui_pwr (MUI_Handler_t *mui_handler, const bool state) |
Command to power on/off the Timepix3 chip. More... | |
void | mui_measureFrame (MUI_Handler_t *mui_handler, const uint16_t acquisition_time, const uint8_t mode) |
Command to acquire a frame over a period of the acquisition_time. As a result, the MiniPIX will start obtaning data and will call the processFrameData() function will be called. More... | |
void | mui_getFrameData (MUI_Handler_t *mui_handler) |
Command to request measured frame data. As a result, the MiniPIX will start obtaning data and will call the processFrameData() function will be called. More... | |
void | mui_updatePixelMask (MUI_Handler_t *mui_handler, LLCP_UpdatePixelMaskReq_t *data) |
Command to update a mask of a particular pixel. More... | |
void | mui_setThreshold (MUI_Handler_t *mui_handler, const uint16_t threshold_coarse, const uint16_t threshold_fine) |
Command to set energy threshold. More... | |
void | mui_setConfigurationPreset (MUI_Handler_t *mui_handler, const uint8_t preset) |
Command to set configuration preset. More... | |
void | mui_getStatus (MUI_Handler_t *mui_handler) |
Command to get the status of the MinixPIX HW. As a result, the method processStatus() will get called. More... | |
void | mui_getTemperature (MUI_Handler_t *mui_handler) |
Command to get the temperature of the MinixPIX HW. As a result, the method processTemperature() will get called. More... | |
void | mui_receiveCharCallback (MUI_Handler_t *mui_handler, const uint8_t byte_in) |
Called by the user with every incoming byte on the UART to the MiniPIX. More... | |
void | mui_update (MUI_Handler_t *mui_handler) |
Called by the user to led MUI do stuff in the background. Should be called regularly, e.g., in the main() loop or in a timer's callback. More... | |
void | mui_sendAck (MUI_Handler_t *mui_handler, const bool success) |
Sends ack to the MiniPIX. Not to be called by the user. More... | |
void | mui_sendMessage (MUI_Handler_t *mui_handler, const uint8_t *str_out, const uint16_t len) |
Abstraction above sending a message. Will use either sendString or sendChar basend on configuration. More... | |
void | mui_ledSet (MUI_Handler_t *mui_handler, const bool new_state) |
set LED state More... | |
void | mui_ledToggle (MUI_Handler_t *mui_handler) |
toggle the state of the LED More... | |
void mui_getFrameData | ( | MUI_Handler_t * | mui_handler | ) |
Command to request measured frame data. As a result, the MiniPIX will start obtaning data and will call the processFrameData() function will be called.
mui_handler |
void mui_getStatus | ( | MUI_Handler_t * | mui_handle | ) |
Command to get the status of the MinixPIX HW. As a result, the method processStatus() will get called.
mui_handle |
void mui_getTemperature | ( | MUI_Handler_t * | mui_handle | ) |
Command to get the temperature of the MinixPIX HW. As a result, the method processTemperature() will get called.
mui_handle |
void mui_initialize | ( | MUI_Handler_t * | mui_handler | ) |
The "constructor" of the MUI handler. Should be called by the user just after allocating it.
mui_handler |
void mui_ledSet | ( | MUI_Handler_t * | mui_handler, |
const bool | new_state | ||
) |
set LED state
mui_handler | |
new_state | true = light is on, false = light is off |
void mui_ledToggle | ( | MUI_Handler_t * | mui_handler | ) |
toggle the state of the LED
mui_handler |
void mui_measureFrame | ( | MUI_Handler_t * | mui_handler, |
const uint16_t | acquisition_time, | ||
const uint8_t | mode | ||
) |
Command to acquire a frame over a period of the acquisition_time. As a result, the MiniPIX will start obtaning data and will call the processFrameData() function will be called.
mui_handler | |
acquisition_time | Acquisition time in milliseconds |
mode | pixel measurement mode: LLCP_TPX3_PXL_MODE_{TOA_TOT,TOA,MPX_ITOT} |
void mui_pwr | ( | MUI_Handler_t * | mui_handler, |
const bool | state | ||
) |
Command to power on/off the Timepix3 chip.
mui_handler | |
state | true/false, power on/off |
void mui_receiveCharCallback | ( | MUI_Handler_t * | mui_handler, |
const uint8_t | byte_in | ||
) |
Called by the user with every incoming byte on the UART to the MiniPIX.
mui_handler | |
byte_in |
void mui_sendAck | ( | MUI_Handler_t * | mui_handler, |
const bool | success | ||
) |
Sends ack to the MiniPIX. Not to be called by the user.
mui_handler | |
success |
void mui_sendMessage | ( | MUI_Handler_t * | mui_handler, |
const uint8_t * | message, | ||
const uint16_t | len | ||
) |
Abstraction above sending a message. Will use either sendString or sendChar basend on configuration.
mui_handler | |
message | the string to send |
len | how many bytes to send |
void mui_setConfigurationPreset | ( | MUI_Handler_t * | mui_handler, |
const uint8_t | preset | ||
) |
Command to set configuration preset.
mui_handler | |
preset |
void mui_setThreshold | ( | MUI_Handler_t * | mui_handler, |
const uint16_t | threshold_coarse, | ||
const uint16_t | threshold_fine | ||
) |
Command to set energy threshold.
mui_handler | |
threshold |
void mui_update | ( | MUI_Handler_t * | mui_handler | ) |
Called by the user to led MUI do stuff in the background. Should be called regularly, e.g., in the main() loop or in a timer's callback.
mui_handler |
void mui_updatePixelMask | ( | MUI_Handler_t * | mui_handler, |
LLCP_UpdatePixelMaskReq_t * | data | ||
) |
Command to update a mask of a particular pixel.
mui_handler | |
LLCP_UpdatePixelMaskReq_t |