代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony-Retired/iothardware_interfaces_kits_wifiiot_lite 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
* Copyright (c) 2020 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup wifiiot
* @{
*
* @brief Provides dedicated device operation interfaces on the Wi-Fi module,
* including ADC, AT, flash, GPIO, I2C, I2S, partition, PWM, SDIO, UART, and watchdog.
*
*
*
* @since 1.0
* @version 1.0
*/
/**
* @file wifiiot_i2c_ex.h
*
* @brief Declares the extended I2C interface functions.
*
* These functions are used for I2C baud rate setting and device exception callback. \n
*
* @since 1.0
* @version 1.0
*/
#ifndef WIFIIOT_I2C_EX_H
#define WIFIIOT_I2C_EX_H
#include "wifiiot_i2c.h"
/**
* @brief Indicates the callback invoked when a device exception occurs.
*
*/
typedef void (*I2CResetFunc)(void);
/**
* @brief Indicates the callback invoked for device preparation.
*
*/
typedef void (*I2cPrepareFunc)(void);
/**
* @brief Indicates the callback invoked for device recovery.
*
*/
typedef void (*I2cRestoreFunc)(void);
/**
* @brief Defines I2C callbacks.
*
* @since 1.0
* @version 1.0
*/
typedef struct {
/** Callback invoked upon an I2C device exception */
I2CResetFunc resetFunc;
/** Callback invoked for data preparation */
I2cPrepareFunc prepareFunc;
/** Callback invoked for data recovery */
I2cRestoreFunc restoreFunc;
} WifiIotI2cFunc;
/**
* @brief Sends data to and receives data responses from an I2C device.
*
*
*
* @param id Indicates the I2C device ID.
* @param deviceAddr Indicates the I2C device address.
* @param i2cData Indicates the pointer to the device descriptor of the data to receive.
* @return Returns {@link WIFI_IOT_SUCCESS} if the operation is successful;
* returns an error code defined in {@link wifiiot_errno.h} otherwise.
* @since 1.0
* @version 1.0
*/
unsigned int I2cWriteread(WifiIotI2cIdx id, unsigned short deviceAddr, const WifiIotI2cData *i2cData);
/**
* @brief Registers an I2C callback.
*
* @param id Indicates the I2C device ID.
* @param pfn Indicates the type of the callback to register.
*
* @since 1.0
* @version 1.0
*/
void I2cRegisterResetBusFunc(WifiIotI2cIdx id, WifiIotI2cFunc pfn);
/**
* @brief Sets the baud rate for an I2C device.
*
*
*
* @param id Indicates the I2C device ID.
* @param baudrate Indicates the I2C baud rate to set.
* @return Returns {@link WIFI_IOT_SUCCESS} if the operation is successful;
* returns an error code defined in {@link wifiiot_errno.h} otherwise.
* @since 1.0
* @version 1.0
*/
unsigned int I2cSetBaudrate(WifiIotI2cIdx id, unsigned int baudrate);
#endif
/** @} */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。