firmware  v0.1.2
Chromation Spectrometer Dev-Kit
Typedefs | Functions | Variables
StatusCode.h File Reference

See cfg/microspec.json in the Python API repository. More...

#include "stdint.h"
#include "stdbool.h"

Go to the source code of this file.

Typedefs

typedef uint8_t const status_code
 Status codes are type status_code.
 
typedef uint8_t const led_state
 Indicator LEDs have three possible states: OFF, GREEN, and RED.
 

Functions

bool led_setting_is_valid (led_state setting)
 

Variables

status_code OK
 
status_code ERROR
 
status_code INVALID_CMD
 
led_state OFF
 
led_state GREEN
 
led_state RED
 
uint8_t PADDING
 When status_code is ERROR, pad responses to send expected number of bytes.
 

Detailed Description

See cfg/microspec.json in the Python API repository.

STATUS CODES

INDICATOR LED STATES

Definition in file StatusCode.h.

Function Documentation

◆ led_setting_is_valid()

bool led_setting_is_valid ( led_state  setting)
inline

led_setting_is_valid behavior:

  • returns TRUE if setting is OFF
  • returns TRUE if setting is GREEN
  • returns TRUE if setting is RED
  • returns FALSE if setting is any other value

Definition at line 53 of file StatusCode.h.