Proyecto Final – Medición de Inclinación 0.0.1
Este proyecto utiliza la placa NUCLEO-STM32F446RE y permite detectar y visualizar en tiempo real la inclinación mediante el sensor MPU-6050.
Cargando...
Buscando...
Nada coincide
dev_i2cm_api.h
1
2#ifndef DEV_I2CM_API_H
3#define DEV_I2CM_API_H
4
5#include "api.h"
6
7#define DEV_I2CM_API_ID 1
8
9/* API Identifiers */
10enum DEV_I2CM_API {
11 I2CM_INITSTART = 0,
12 I2CM_DEINIT = 1,
13 I2CM_WRITE = 2,
14 I2CM_READ = 3,
15 I2CM_READ_SR = 4,
16 I2CM_ISDEVICEREADY = 5,
17};
18
19/* API Function List */
20#define DEV_I2CM_FUNCTIONS_COUNT 6
21extern const FPTRS DEV_I2CM_FPTRS[DEV_I2CM_FUNCTIONS_COUNT];
22
24#define I2C_TIMEOUT (5000)
25
26
27
35HAL_StatusTypeDef I2CM_InitStart (void);
36
37
38
46HAL_StatusTypeDef I2CM_DeInit (void);
47
48
49
60HAL_StatusTypeDef I2CM_Write (uint8_t address, uint8_t* data, uint16_t size);
61
62
63
74HAL_StatusTypeDef I2CM_Read (uint8_t address, uint8_t* data, uint16_t size);
75
76
77
89HAL_StatusTypeDef I2CM_Read_Sr (uint8_t address, uint8_t reg, uint8_t* data, uint16_t size);
90
91
92
102HAL_StatusTypeDef I2CM_IsDeviceReady (uint8_t address, uint32_t trials);
103
104
105
106
107#endif // _DEV__API_H
: Header for main.c file. This file contains the common defines of the application.
HAL_StatusTypeDef I2CM_DeInit(void)
Desinicializa I2C1.
Definition dev_i2cm.c:48
HAL_StatusTypeDef I2CM_InitStart(void)
Inicializa I2C1 a 400 kHz, 7-bit, sin dual address.
Definition dev_i2cm.c:30