Skip to content

Commit

Permalink
Clarified spi_callback functionality. Part of #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter O'Hanley committed Dec 21, 2018
1 parent a969e00 commit 5999a6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Unlike the remote api with its many functions, this has only two, send and recei
You must write a custom program running on the AMMDK k66f to make any practical use of this functionality.

`test/blip-test.cpp` is an example of a program that uses this API.
It requires `heartrateLED.elf` from the `amm-tiny` repo to be on the k66f.

## Functions

Expand All @@ -13,6 +14,7 @@ You must write a custom program running on the AMMDK k66f to make any practical
* -1 if `len` > `SPI_MSG_PAYLOAD_LEN`
* -2 if no space available to send message

`TODO` is a callback for received messages.
The `spi_callback` variable is a callback for received messages.
If you do not need to receive messages, it can be `NULL` but it must be present.

`void datagram_task(void)` should be called as a thread, like `std::thread thread(datagram_task);` and must be running before `send_message` is called.

0 comments on commit 5999a6f

Please sign in to comment.