72 ::memset(PWM_last_changed,0,
sizeof(PWM_last_changed));
73 ::memset(DAC_last_changed,0,
sizeof(DAC_last_changed));
83 for (
int i=0;i<ntimes;i++)
93 Serial.write(rx,
sizeof(rx));
114 memcpy(&dac_req,data,
sizeof(dac_req));
117 static bool dac_init =
false;
143 const uint8_t pin_no = data[0];
144 const uint8_t pin_val = data[1];
156 const uint8_t pin_no = data[0];
162 Serial.write(rx,
sizeof(rx));
171 memcpy(&adc_req,data,
sizeof(adc_req));
175 for (
int i=0;i<8;i++) {
208 memcpy(&pwm_req,data,
sizeof(pwm_req));
232 memcpy(&enc_req,data,
sizeof(enc_req));
258 memcpy(&EMS22A_req,data,
sizeof(EMS22A_req));
297 const unsigned long tnow =
millis();
void BASE_IMPEXP memcpy(void *dest, size_t destSize, const void *src, size_t copyCount) MRPT_NO_THROWS
void mod_dac_max5500_init()
unsigned long PWM_last_changed[16]
Last timestamp (millis()) for each PWM channel.
void pinMode(uint8_t, uint8_t)
void init_encoders(const TFrameCMD_ENCODERS_start_payload_t &cmd)
unsigned long DAC_last_changed[4]
Last timestamp (millis()) for each DAC channel.
uint8_t num_active_ADC_channels
uint8_t analog_value
0-255 maps to 0% to 100% duty cycle
uint8_t flag_enable_timeout
uint16_t ADC_sampling_period_ms
int8_t active_channels[8]
void analogWrite(uint8_t, int)
void analogReference(uint8_t mode)
void send_simple_opcode_frame(const uint8_t op)
uint8_t flag_enable_timeout
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
void delay(unsigned long)
unsigned long millis(void)
bool init_EMS22A(int8_t ENCODER_ABS_CS, int8_t ENCODER_ABS_CLK, int8_t ENCODER_ABS_DO, uint16_t sampling_period_ms)
uint8_t ADC_active_channels[MAX_ADC_CHANNELS]
void process_command(const uint8_t opcode, const uint8_t datalen, const uint8_t *data)
unsigned long TIMEOUT_TICKS
Number of millis() ticks to timeout an output signal. Default=1000 ms.
void digitalWrite(uint8_t, uint8_t)
uint16_t sampling_period_ms
uint8_t use_internal_refvolt
0 or 1. Default=0
TimeoutData PendingTimeouts
void flash_led(int ntimes, int nms)
uint16_t measure_period_ms
Default = 200.
void mod_dac_max5500_update_single_DAC(uint8_t dac_idx, uint16_t dac_value)