BNO055 extension board example for SAME70.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
#include "conf_board.h"
#include "conf_bno055.h"
#include "bno055.h"
#include "stdint.h"
Macros | |
#define | I2C_BUFFER_LEN 8 |
Functions | |
void | bno055_delay_msek (uint32_t msek) |
void | bno055_gpio_config (void) |
void | bno055_i2c_bus_init (void) |
int8_t | bno055_i2c_bus_read (uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data, uint8_t cnt) |
int8_t | bno055_i2c_bus_write (uint8_t dev_addr, uint8_t reg_addr, uint8_t *reg_data, uint8_t cnt) |
void | bno055_initialize (void) |
void | bno055_reset (void) |
void | extint_initialize (void(*handler_function)(void)) |
Variables | |
struct bno055_t | bno055 |
#define I2C_BUFFER_LEN 8 |
void bno055_delay_msek | ( | uint32_t | msek | ) |
References delay_ms.
Referenced by bno055_initialize().
void bno055_gpio_config | ( | void | ) |
References IOPORT_DIR_OUTPUT, and ioport_set_pin_dir().
Referenced by main().
void bno055_i2c_bus_init | ( | void | ) |
References twihs_options::master_clk, pmc_enable_periph_clk(), twihs_options::speed, sysclk_get_cpu_hz(), and twihs_master_init().
Referenced by main().
int8_t bno055_i2c_bus_read | ( | uint8_t | dev_addr, |
uint8_t | reg_addr, | ||
uint8_t * | reg_data, | ||
uint8_t | cnt | ||
) |
References twihs_packet::addr, twihs_packet::addr_length, BNO055_ZERO_U8X, twihs_packet::buffer, twihs_packet::chip, bno055_t::dev_addr, twihs_packet::length, and twihs_master_read().
Referenced by bno055_initialize().
int8_t bno055_i2c_bus_write | ( | uint8_t | dev_addr, |
uint8_t | reg_addr, | ||
uint8_t * | reg_data, | ||
uint8_t | cnt | ||
) |
References twihs_packet::addr, twihs_packet::addr_length, BNO055_ZERO_U8X, twihs_packet::buffer, twihs_packet::chip, bno055_t::dev_addr, twihs_packet::length, and twihs_master_write().
Referenced by bno055_initialize().
void bno055_initialize | ( | void | ) |
References bno055, bno055_delay_msek(), bno055_i2c_bus_read(), bno055_i2c_bus_write(), bno055_init(), bno055_reset(), bno055_t::delay_msec, bno055_t::dev_addr, and ioport_set_pin_level().
Referenced by sensor_init().
void bno055_reset | ( | void | ) |
References delay_ms, and ioport_set_pin_level().
Referenced by bno055_initialize().
void extint_initialize | ( | void(*)(void) | handler_function | ) |
References pio_configure(), pio_enable_interrupt(), and pmc_enable_periph_clk().
Referenced by main().
struct bno055_t bno055 |
Referenced by bno055_init(), and bno055_initialize().