EZR32 Wonder Gecko Software Documentation  ezr32wg-doc-5.1.2
board.c File Reference

Detailed Description

BOARD module source file.

Version
5.1.1

License

Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com

This file is licensed under the Silicon Labs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file board.c.

#include <stdint.h>
#include <stdbool.h>
#include "i2cspm.h"
#include "em_cmu.h"
#include "em_gpio.h"
#include "em_prs.h"
#include "em_timer.h"
#include "em_usart.h"
#include "thunderboard/board.h"
#include "thunderboard/util.h"

Go to the source code of this file.

Functions

uint32_t BOARD_envSensEnable (bool enable)
 Enables or disables the environmental sensor group (Pressure, RH/Temp, UV/Ambient light and Hall sensors) More...
 
uint32_t BOARD_envSensEnableIRQ (bool enable)
 Enables or disables the environmental sensor group (Pressure, RH/Temp, UV/Ambient light and Hall sensors) GPIO interrupts. More...
 
void BOARD_flashDeepPowerDown (void)
 Puts the Flash chip in deep power down mode. More...
 
uint32_t BOARD_gasSensorEnable (bool enable)
 Enables or disables the Air Quality / Gas Sensor. More...
 
uint32_t BOARD_gasSensorEnableIRQ (bool enable)
 Enables or disables the Air Quality / Gas Sensor GPIO interrupt. More...
 
uint32_t BOARD_gasSensorWake (bool wake)
 Wakes up the Air Quality / Gas Sensor. More...
 
uint32_t BOARD_imuEnable (bool enable)
 Enables or disables the accelerometer and gyroscope sensor. More...
 
uint32_t BOARD_imuEnableIRQ (bool enable)
 Enables or disables the accelerometer and gyroscope GPIO interrupt. More...
 
uint32_t BOARD_init (void)
 Initializes the Thunderboard Sense board. More...
 
void BOARD_ledSet (uint8_t leds)
 Turns on or off the red and/or green LED. More...
 
uint32_t BOARD_micEnable (bool enable)
 Enables or disables the MEMS microphone. More...
 
uint32_t BOARD_picGetDeviceId (void)
 Reads the device ID of the IO expander. More...
 
uint32_t BOARD_picGetFwRevision (uint8_t *major, uint8_t *minor, uint8_t *patch)
 Reads the firmware revision of the IO expander. More...
 
uint8_t BOARD_picGetHwRevision (void)
 Reads the hardware revision of the IO expander. More...
 
uint32_t BOARD_picIntClear (uint8_t flags)
 Clears the interrupt status flags in the interrupt controller. More...
 
uint32_t BOARD_picIntGet (uint8_t *flags)
 Reads the interrupt status flags from the interrupt controller. More...
 
bool BOARD_picIsLegacyIntCtrl (void)
 Checks if the legacy interrupt control method should be used. More...
 
uint32_t BOARD_picReadReg (uint8_t reg, uint8_t *result)
 Reads a register in the IO expander. More...
 
uint32_t BOARD_picRegBitsSet (uint8_t addr, bool set, uint8_t bitMask)
 Sets the given bit(s) in a register in the IO expander. More...
 
uint32_t BOARD_picWriteReg (uint8_t reg, uint8_t value)
 Writes a register in the IO expander. More...
 
void BOARD_pushButtonEnableIRQ (bool enable)
 Enables or disables the pushbutton GPIO interrupt. More...
 
uint8_t BOARD_pushButtonGetState (void)
 Gets the state of the pushbuttons. More...
 
void BOARD_rgbledEnable (bool enable, uint8_t mask)
 Enables or disables the RGB LED power supply line. More...
 
void BOARD_rgbledPowerEnable (bool enable)
 Enables or disables the RGB LED power supply line. More...
 
void BOARD_rgbledSetColor (uint8_t red, uint8_t green, uint8_t blue)
 Sets the color of the RGB LEDs. The brightness of the LEDs is almost linear to the color value. More...
 
void BOARD_rgbledSetRawColor (uint16_t red, uint16_t green, uint16_t blue)
 Sets the raw color of the RGB LEDs. The brightness is non-linear function of the raw color value. More...