Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Create a thread called operation_listener. It will be very similar to the thread prv_rx_thread in x86/can_hw.c

Will essentially take in a “request” and immediate does operations on it.

<OPERATION>: LEN, PARAM1, PARAM2, PARAM3

ID

Operation

PARAM1

PARAM2

PARAM3

0

GPIO_SET

GPIO PORT

GPIO PIN

STATE

1

GPIO_TOGGLE

GPIO PORT

GPIO PIN

2

GPIO_IT_TRIGGER

GPIO PORT

GPIO PIN

3

ADC_SET_READING

GPIO PORT

GPIO PIN

READING

4

I2C_SET_READING

I2C PORT

I2C DATA

I2C LEN

5

SPI_SET_RX

SPI PORT

SPI DATA

SPI LEN

6

UART???

To create the task, create function called sim_init(int socket_num)

Main functions will need to be changed into this for simulation:

#ifdef x86
int main(int argc, char *argv[]) {
  sim_init(argv[0]); // Need to cast this into an int for socket number
#else
int main() {
#endif

  • No labels