ESOS32
ESOSOn32-bitProcessors
esos_spi.c
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2019 J. W. Bruce ("AUTHOR(S)")"
3  * All rights reserved.
4  * (J. W. Bruce, jwbruce_AT_tntech.edu, Tennessee Tech University)
5  *
6  * Permission to use, copy, modify, and distribute this software and its
7  * documentation for any purpose, without fee, and without written agreement is
8  * hereby granted, provided that the above copyright notice, the following
9  * two paragraphs and the authors appear in all copies of this software.
10  *
11  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
12  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
13  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
14  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15  *
16  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
17  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
19  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
20  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
21  *
22  * Please maintain this header in its entirety when copying/modifying
23  * these files.
24  *
25  *
26  */
27 
28 
34 // Documentation for this file. If the \file tag isn't present,
35 // this file won't be documented.
43 /*** I N C L U D E S *************************************************/
44 #include "esos.h"
45 #include "esos_spi.h"
46 
47 /*** G L O B A L S *************************************************/
48 struct stTask __stChildTaskSPI; // req'd child task for SPI hw functions
49 uint16_t __esos_spi_u16s[2]; // storage for the child task arguments
50 
51 /*** T H E C O D E *************************************************/
52 
53 /*********************************************************
54  * Public functions intended to be called by other files *
55  *********************************************************/
56 
70 void __esos_spi_config(uint32_t u32_spibps) {
71  // setup any ESOS structures needed for SPI here
72  __esos_SetSystemFlag(__ESOS_SYS_SPI_IS_BUSY);
73 
74  // call the hardware provided function to setup the HW itself
75  __esos_spi_hw_config( u32_spibps);
76 
77  // do any last-minute I2C configuration for ESOS
78  __esos_ClearSystemFlag(__ESOS_SYS_SPI_IS_BUSY);
79 }
80 
esos_spi.h
__esos_spi_config
void __esos_spi_config(uint32_t u32_spibps)
Definition: esos_spi.c:70
esos.h
stTask
Definition: esos_task.h:54