| Mini51 BSP V3.02.002 The Board Support Package for Mini51 Series

Data Structures | Functions
i2c_software_gpio_with_timer.h File Reference

This is the header file of i2c_software_gpio_with_timer.c. More...

`#include "Mini51Series.h"`

Go to the source code of this file.

## Data Structures
struct | I2C_SW_FLAG_T

## Functions
uint32_t | I2C_SW_I_Open (uint32_t u32BusClock)
| Prepare to start software I2C. More...
uint32_t | I2C_SW_I_Send (uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
| Send data. More...
uint32_t | I2C_SW_I_Get (uint8_t u8Address, uint8_t *p8Data, uint32_t u32ByteSize)
| Read data. More...
uint32_t | I2C_SW_I_IsBZ (void)
| Check if I2C is busy. More...
uint32_t | I2C_SW_I_Count (void)
| Return byte counter. More...

## Detailed Description

This is the header file of i2c_software_gpio_with_timer.c.

Version
  V0.10

Revision
  5

Date
  13/11/07 4:40p

Note
  SPDX-License-Identifier: Apache-2.0 Copyright (C) 2013 Nuvoton Technology Corp. All rights reserved.

Definition in file i2c_software_gpio_with_timer.h.

## Function Documentation

## ◆ I2C_SW_I_Count()

uint32_t I2C_SW_I_Count | ( | void |  | ) |

Return byte counter.

Parameters

  - |

Return values

  Byte | counter

Definition at line 271 of file i2c_software_gpio_with_timer.c.

## ◆ I2C_SW_I_Get()

uint32_t I2C_SW_I_Get | ( | uint8_t | u8Address,
|  | uint8_t * | p8Data,
|  | uint32_t | u32ByteSize
| ) |  |

Read data.

Parameters

  u8Address | I2C slave address
  p8Data | data address
  u32ByteSize | data length

Return values

  0 | Success
  1 | Fail

Definition at line 284 of file i2c_software_gpio_with_timer.c.

## ◆ I2C_SW_I_IsBZ()

uint32_t I2C_SW_I_IsBZ | ( | void |  | ) |

Check if I2C is busy.

Parameters

  None |

Return values

  0 | Not Busy
  1 | Busy

Definition at line 261 of file i2c_software_gpio_with_timer.c.

## ◆ I2C_SW_I_Open()

uint32_t I2C_SW_I_Open | ( | uint32_t | u32BusClock | ) |

Prepare to start software I2C.

Parameters

  u32BusClock | I2C Bus Clock (Hz)

Return values

  0 | Success

Definition at line 33 of file i2c_software_gpio_with_timer.c.

## ◆ I2C_SW_I_Send()

uint32_t I2C_SW_I_Send | ( | uint8_t | u8Address,
|  | uint8_t * | p8Data,
|  | uint32_t | u32ByteSize
| ) |  |

Send data.

Parameters

  u8Address | I2C slave address
  p8Data | data address
  u32ByteSize | data length

Return values

  1 | I2C is busy
  0 | Success

Definition at line 232 of file i2c_software_gpio_with_timer.c.