Defining the architecture

The command executor architecture is composed of three primary blocks; each block executes asynchronously to the others and communicates via a queue and stream buffer:

  • LED Cmd ExecutorLedCmdExecution in ledCmdExecutor.c receives data from ledCmdQueue and actuates the LEDs via pointers to iPWM (one for each color). LedCmdExecution is a FreeRTOS task that takes CmdExecArgs as an argument upon creation.
  • Frame protocol decodingmainColorSelector.c receives raw data from the stream buffer populated by the USB virtual comm driver, ensures valid framing, and populates the LedCmd queue.
  • The USB virtual comm driver: The USB stack is spread across many files; the primary user-entry point is VirtualCommDriverMultiTask.c

Here's a visual representation of how all of these major components stack up and flow together. Major blocks are listed on the left, while representations of the data they operate on are to the right:

Let's take a closer look at each one of these components.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.228.95