no-OS
drivers
platform
maxim
max32655
maxim_i2c.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* @file maxim_i2c.h
3
* @brief Header containing types used in the i2c driver.
4
* @author Andrei Drimbarean (andrei.drimbarean@analog.com)
5
* @author Ciprian Regus (ciprian.regus@analog.com)
6
********************************************************************************
7
* Copyright 2022(c) Analog Devices, Inc.
8
*
9
* All rights reserved.
10
*
11
* Redistribution and use in source and binary forms, with or without
12
* modification, are permitted provided that the following conditions are met:
13
* - Redistributions of source code must retain the above copyright
14
* notice, this list of conditions and the following disclaimer.
15
* - Redistributions in binary form must reproduce the above copyright
16
* notice, this list of conditions and the following disclaimer in
17
* the documentation and/or other materials provided with the
18
* distribution.
19
* - Neither the name of Analog Devices, Inc. nor the names of its
20
* contributors may be used to endorse or promote products derived
21
* from this software without specific prior written permission.
22
* - The use of this software may or may not infringe the patent rights
23
* of one or more patent holders. This license does not release you
24
* from the requirement that you obtain separate licenses from these
25
* patent holders to use this software.
26
* - Use of the software either in source or binary form, must be run
27
* on or directly connected to an Analog Devices Inc. component.
28
*
29
* THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
30
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
31
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32
* IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
33
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34
* LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
35
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
37
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
*******************************************************************************/
40
41
#ifndef MAXIM_I2C_H_
42
#define MAXIM_I2C_H_
43
44
#include <stdint.h>
45
#include "i2c_regs.h"
46
#include "max32655.h"
47
52
struct
max_i2c_extra
{
54
mxc_i2c_regs_t *
handler
;
57
uint8_t *
prologue_data
;
60
uint8_t
prologue_size
;
61
};
62
63
struct
max_i2c_init_param
{
64
mxc_gpio_vssel_t
vssel
;
65
};
66
71
enum
max_i2c_speed
{
72
MAX_I2C_STD_MODE
= 100000,
73
MAX_I2C_FAST_MODE
= 400000,
74
MAX_I2C_FAST_PLUS_MODE
= 1000000,
75
MAX_I2C_HS_MODE
= 3400000
76
};
77
81
extern
const
struct
no_os_i2c_platform_ops
max_i2c_ops
;
82
83
#endif
/* MAXIM_I2C_H_ */
max_i2c_ops
const struct no_os_i2c_platform_ops max_i2c_ops
MAXIM specific I2C platform ops structure.
Definition:
maxim_i2c.c:329
max_i2c_init_param
Definition:
maxim_i2c.h:63
max_i2c_extra::handler
mxc_i2c_regs_t * handler
Definition:
maxim_i2c.h:54
max_i2c_init_param::vssel
mxc_gpio_vssel_t vssel
Definition:
maxim_i2c.h:64
max_i2c_extra
MAXIM specific I2C handler structure.
Definition:
maxim_i2c.h:52
MAX_I2C_FAST_MODE
@ MAX_I2C_FAST_MODE
Definition:
maxim_i2c.h:73
MAX_I2C_STD_MODE
@ MAX_I2C_STD_MODE
Definition:
maxim_i2c.h:72
no_os_i2c_platform_ops
Structure holding I2C function pointers that point to the platform specific function.
Definition:
no_os_i2c.h:99
max_i2c_speed
max_i2c_speed
MAXIM I2C SCL frequency options.
Definition:
maxim_i2c.h:71
MAX_I2C_FAST_PLUS_MODE
@ MAX_I2C_FAST_PLUS_MODE
Definition:
maxim_i2c.h:74
MAX_I2C_HS_MODE
@ MAX_I2C_HS_MODE
Definition:
maxim_i2c.h:75
max_i2c_extra::prologue_data
uint8_t * prologue_data
Definition:
maxim_i2c.h:57
max_i2c_extra::prologue_size
uint8_t prologue_size
Definition:
maxim_i2c.h:60
Generated by
1.8.17