OpenBIC
OpenSource Bridge-IC
i2c-mux-pca984x.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef I2C_MUX_PCA984X_H
18#define I2C_MUX_PCA984X_H
19
20#define PCA9846_MUTEX_LOCK_MS 1000
21#define PCA9846_DEFAULT_CHANNEL 0
22
28};
29
39};
40
41bool set_pca9846_channel_and_transfer(uint8_t bus, uint8_t mux_addr, uint8_t mux_channel,
42 uint8_t tran_type, I2C_MSG *msg);
43
44#endif
PCA9846_CHANNEL
Definition: i2c-mux-pca984x.h:23
@ PCA9846_CHANNEL_0
Definition: i2c-mux-pca984x.h:24
@ PCA9846_CHANNEL_3
Definition: i2c-mux-pca984x.h:27
@ PCA9846_CHANNEL_1
Definition: i2c-mux-pca984x.h:25
@ PCA9846_CHANNEL_2
Definition: i2c-mux-pca984x.h:26
bool set_pca9846_channel_and_transfer(uint8_t bus, uint8_t mux_addr, uint8_t mux_channel, uint8_t tran_type, I2C_MSG *msg)
Definition: i2c-mux-pca984x.c:26
PCA9848_CHANNEL
Definition: i2c-mux-pca984x.h:30
@ PCA9848_CHANNEL_0
Definition: i2c-mux-pca984x.h:31
@ PCA9848_CHANNEL_1
Definition: i2c-mux-pca984x.h:32
@ PCA9848_CHANNEL_4
Definition: i2c-mux-pca984x.h:35
@ PCA9848_CHANNEL_7
Definition: i2c-mux-pca984x.h:38
@ PCA9848_CHANNEL_6
Definition: i2c-mux-pca984x.h:37
@ PCA9848_CHANNEL_2
Definition: i2c-mux-pca984x.h:33
@ PCA9848_CHANNEL_3
Definition: i2c-mux-pca984x.h:34
@ PCA9848_CHANNEL_5
Definition: i2c-mux-pca984x.h:36
Definition: hal_i2c.h:163