| BlueNRG-1 Peripherals drivers Examples

- Main Page
- Modules
- Classes
- Files

Macros | Enumerations | Functions
I2C Master
BlueNRG1 Standard Peripheral Examples » I2C Examples

## Macros

#define | TOGGLE_DL1 '1'
#define | TOGGLE_DL2 '2'
#define | TOGGLE_DL3 '3'
#define | DEV_ADDRESS 0xBE
#define | SDK_EVAL_I2C_CLK_SPEED (10000)

## Enumerations

enum | I2C_AppOpStatus { I2C_OP_FAILED = 0, I2C_OP_SUCCEED }

## Functions

void | I2C_ConfigurationMaster (void)
| I2C Master initialization. More...
I2C_AppOpStatus | I2C_Read_Reg (uint8_t dev_address, uint8_t send_val, uint8_t *get_val)
| I2C Master communication. More...
int | main (void)
| Main program code. More...

## Detailed Description

## Macro Definition Documentation

#define DEV_ADDRESS 0xBE

Definition at line 230 of file I2C_Master_Polling_main.c.

#define SDK_EVAL_I2C_CLK_SPEED (10000)

Definition at line 233 of file I2C_Master_Polling_main.c.

#define TOGGLE_DL1 '1'

Definition at line 225 of file I2C_Master_Polling_main.c.

#define TOGGLE_DL2 '2'

Definition at line 226 of file I2C_Master_Polling_main.c.

#define TOGGLE_DL3 '3'

Definition at line 227 of file I2C_Master_Polling_main.c.

## Enumeration Type Documentation

enum I2C_AppOpStatus

Enumerator
I2C_OP_FAILED |
I2C_OP_SUCCEED |

Definition at line 218 of file I2C_Master_Polling_main.c.

## Function Documentation

void I2C_ConfigurationMaster | ( | void |  | ) |

I2C Master initialization.

Parameters

  None |

Return values

  None |

Definition at line 355 of file I2C_Master_Polling_main.c.

I2C_AppOpStatus I2C_Read_Reg | ( | uint8_t | dev_address,
|  | uint8_t | send_val,
|  | uint8_t * | get_val
| ) |  |

I2C Master communication.

Parameters

  uint8_t | dev_address: I2C device address
  uint8_t | send_val: value to send
  uint8_t | get_val: value to get

Return values

  I2C_OpStatus | I2C operation sattus

Definition at line 397 of file I2C_Master_Polling_main.c.

int main | ( | void |  | ) |

Main program code.

Parameters

  None |

Return values

  None |

Definition at line 250 of file I2C_Master_Polling_main.c.