ESOS32
ESOSOn32-bitProcessors
esos_hwxxx_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.
42 /*** I N C L U D E S *************************************************/
43 #include "esos_hwxxx_i2c.h"
44 
45 
46 /*** D E F I N E S *************************************************/
47 
48 /*** G L O B A L S *************************************************/
49 struct stTask __stChildTaskI2C, __stGrandChildTaskI2C;
50 uint8_t __esos_i2c_dataBytes[2];
51 
52 /*** T H E C O D E *************************************************/
53 
54 /*********************************************************
55  * Public functions intended to be called by other files *
56  *********************************************************/
57 
58 // Documentation for this file. If the \file tag is not present,
59 // this file will not be documented.
60 // Note: place this comment below the #if NUM_I2C_MODS so Doxygen
61 // will only see it once.
74 void __esos_i2c_hw_config(uint32_t u32_i2cbps) {
75  // Set up the hardware aspects of the STM32L4 interface of the
76  // I2C service direction, timings, address sizes, etc beyond
77  // what is already done in esos_i2c_config()
78 
79 
80 }
81 
90 ESOS_CHILD_TASK( __esos_i2c_hw_writeN, uint8_t u8_addr, uint8_t* pu8_d, uint8_t u8_cnt) {
92 
93  // put your hardware specific-code here
94 
95  ESOS_TASK_END();
96 } // end __esos_i2c_hw_writeN
97 
108 ESOS_CHILD_TASK( __esos_i2c_hw_readN, uint8_t u8_addr, uint8_t* pu8_d, uint8_t u8_cnt) {
109  ESOS_TASK_BEGIN();
110 
111  // put your hardware specific-code here
112 
113  ESOS_TASK_END();
114 } // end __esos_i2c_hw_readN
115 
128 ESOS_CHILD_TASK( __esos_i2c_hw_writeNReadM, uint8_t u8_addr, uint8_t* pu8_wd, uint8_t u8_wcnt, uint8_t* pu8_rd, uint8_t u8_rcnt) {
129  ESOS_TASK_BEGIN();
130 
131  // put your hardware specific-code here
132 
133  ESOS_TASK_END();
134 } // end __esos_i2c_hw_writeN
ESOS_CHILD_TASK
ESOS_CHILD_TASK(__esos_i2c_hw_writeN, uint8_t u8_addr, uint8_t *pu8_d, uint8_t u8_cnt)
Definition: esos_hwxxx_i2c.c:90
esos_hwxxx_i2c.h
This file contains template routines which define, configure and allow use of the I2C service on some...
__esos_i2c_hw_config
void __esos_i2c_hw_config(uint32_t u32_i2cbps)
Definition: esos_hwxxx_i2c.c:74
ESOS_TASK_END
#define ESOS_TASK_END()
Definition: esos_task.h:271
stTask
Definition: esos_task.h:54
ESOS_TASK_BEGIN
#define ESOS_TASK_BEGIN()
Definition: esos_task.h:259