ESOS32
ESOSOn32-bitProcessors
esos_i2c.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_i2c.h"
46 
47 /*** G L O B A L S *************************************************/
48 struct stTask __stChildTaskI2C;
49 uint8_t __esos_i2c_dataBytes[2];
50 
51 /*** T H E C O D E *************************************************/
52 
53 /*********************************************************
54  * Public functions intended to be called by other files *
55  *********************************************************/
56 
65 void __esos_i2c_config(uint32_t u32_i2cbps) {
66  // setup any ESOS structures needed for I2C here
67  __esos_SetSystemFlag(__ESOS_SYS_I2C_IS_BUSY);
68 
69  // call the hardware provided function to setup the HW itself
70  __esos_i2c_hw_config( u32_i2cbps);
71 
72  // do any last-minute I2C configuration for ESOS
73  __esos_ClearSystemFlag(__ESOS_SYS_I2C_IS_BUSY);
74 }
75 
__esos_i2c_config
void __esos_i2c_config(uint32_t u32_i2cbps)
Definition: esos_i2c.c:65
__esos_i2c_hw_config
void __esos_i2c_hw_config(uint32_t u32_i2cbps)
Definition: esos_hwxxx_i2c.c:74
esos.h
stTask
Definition: esos_task.h:54
esos_i2c.h