| 39 | |
| 40 | Any other inputs are explained at the top of that function in {{{radio_controller.h}}}. |
| 41 | |
| 42 | === Initialization === |
| 43 | |
| 44 | The core uses just one Serial Peripheral Interface (SPI) to control both the Maxim Radio as well DAC. Hence certain changes need to be made to the SPI core before addressing one or the other. Before calling any {{{WarpRadio_}}} functions be sure to call {{{WarpRadio_InitializeSPI}}}. This must be done before any call to the radios after just calling a function on the DACs. Similarly {{{WarpDac_InitializeSPI}}} must be called before accessing any of its functions. |
| 45 | |
| 46 | A good rule of thumb for intialization at the start of time is to execute the following statements in order: |
| 47 | {{{ |
| 48 | WarpDac_InitializeSPI(...) |
| 49 | WarpDac_Reset(...) |
| 50 | WarpDac_InitializeDAC(...) |
| 51 | WarpRadio_InitializeSPI(...) |
| 52 | WarpRadio_Reset(...) |
| 53 | WarpRadio_InitializeRadio(...) |
| 54 | }}} |
| 55 | Just to reiterate, notice how the InitializeSPI functions of both the radio and DAC are called before a function call of that type. |