KubOS
|
KubOS-HAL
|
Kubos-HAL-STM32F4 0.1.2
Main Page
Modules
Files
File List
Globals
kubos-hal-stm32f4
i2c.h
Go to the documentation of this file.
1
/*
2
* KubOS HAL
3
* Copyright (C) 2016 Kubos Corporation
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#if (defined YOTTA_CFG_HARDWARE_I2C) && (YOTTA_CFG_HARDWARE_I2C_COUNT > 0)
19
#ifndef K_I2C_STM32F4
20
#define K_I2C_STM32F4
21
22
#include "stm32f4xx_hal.h"
23
#include "stm32f4xx_hal_i2c.h"
24
25
typedef
struct
26
{
27
uint16_t
scl
;
28
uint16_t
scl_mode
;
29
uint16_t
scl_pullup
;
30
uint16_t
scl_speed
;
31
uint16_t
sda
;
32
uint16_t
sda_mode
;
33
uint16_t
sda_pullup
;
34
uint16_t
sda_speed
;
35
uint16_t
alt
;
36
uint16_t
ev_irqn
;
37
uint16_t
er_irqn
;
38
GPIO_TypeDef *
gpio_port
;
39
}
hal_i2c_pins
;
40
41
typedef
struct
42
{
43
/* Kubos-HAL structure */
44
KI2C *
ki2c
;
45
/* STM32CubeF4 HAL structure */
46
I2C_HandleTypeDef
hal_handle
;
47
/* GPIO config pins/ports */
48
hal_i2c_pins
pins
;
49
}
hal_i2c_handle
;
50
51
#endif
52
#endif
hal_i2c_pins::er_irqn
uint16_t er_irqn
Definition:
i2c.h:37
hal_i2c_handle::pins
hal_i2c_pins pins
Definition:
i2c.h:48
hal_i2c_pins::gpio_port
GPIO_TypeDef * gpio_port
Definition:
i2c.h:38
hal_i2c_pins::sda_speed
uint16_t sda_speed
Definition:
i2c.h:34
hal_i2c_pins::sda_pullup
uint16_t sda_pullup
Definition:
i2c.h:33
hal_i2c_handle
Definition:
i2c.h:41
hal_i2c_pins::alt
uint16_t alt
Definition:
i2c.h:35
hal_i2c_pins::scl_mode
uint16_t scl_mode
Definition:
i2c.h:28
hal_i2c_handle::ki2c
KI2C * ki2c
Definition:
i2c.h:44
hal_i2c_pins::sda_mode
uint16_t sda_mode
Definition:
i2c.h:32
hal_i2c_handle::hal_handle
I2C_HandleTypeDef hal_handle
Definition:
i2c.h:46
hal_i2c_pins::sda
uint16_t sda
Definition:
i2c.h:31
hal_i2c_pins::scl
uint16_t scl
Definition:
i2c.h:27
hal_i2c_pins::ev_irqn
uint16_t ev_irqn
Definition:
i2c.h:36
hal_i2c_pins::scl_speed
uint16_t scl_speed
Definition:
i2c.h:30
hal_i2c_pins::scl_pullup
uint16_t scl_pullup
Definition:
i2c.h:29
hal_i2c_pins
Definition:
i2c.h:25
Generated by
1.8.11