Cheetah Software  1.0
rt_spi_lcm.cpp
Go to the documentation of this file.
1 #include <pthread.h>
2 #include <rt/rt_spi_lcm.h>
3 
4 lcm::LCM *min_lcm_spi = NULL;
5 
6 // just adds the spi command handler to the main lcm
7 void init_spi_lcm(lcm::LCM *main_lcm) {
8  printf("[RT SPI LCM] Initializing...\n");
9  min_lcm_spi = main_lcm;
10 }
11 
12 void publish_spi_data(spi_data_t *data) {
13  min_lcm_spi->publish("CHEETAH_spi_data", data);
14 }
15 
16 void publish_spi_torque(spi_torque_t *data) {
17  if (min_lcm_spi == NULL) return;
18  min_lcm_spi->publish("CHEETAH_spi_torque", data);
19 }
lcm::LCM * min_lcm_spi
Definition: rt_spi_lcm.cpp:4
void init_spi_lcm(lcm::LCM *main_lcm)
Definition: rt_spi_lcm.cpp:7
void publish_spi_torque(spi_torque_t *data)
Definition: rt_spi_lcm.cpp:16
void publish_spi_data(spi_data_t *data)
Definition: rt_spi_lcm.cpp:12