ccs811

package module
v0.0.0-...-c68f2de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//// Registers
	CCS811_STATUS          = 0x00
	CCS811_MEAS_MODE       = 0x01
	CCS811_ALG_RESULT_DATA = 0x02
	CCS811_RAW_DATA        = 0x03
	CCS811_ENV_DATA        = 0x05
	CCS811_NTC             = 0x06
	CCS811_THRESHOLDS      = 0x10
	CCS811_BASELINE        = 0x11
	CCS811_HW_ID           = 0x20
	CCS811_HW_VERSION      = 0x21
	CCS811_FW_BOOT_VERSION = 0x23
	CCS811_FW_APP_VERSION  = 0x24
	CCS811_ERROR_ID        = 0xE0
	CCS811_SW_RESET        = 0xFF
	//// Bootloader Registers
	CCS811_BOOTLOADER_APP_ERASE  = 0xF1
	CCS811_BOOTLOADER_APP_DATA   = 0xF2
	CCS811_BOOTLOADER_APP_VERIFY = 0xF3
	CCS811_BOOTLOADER_APP_START  = 0xF4
	//// Drive mode
	CCS811_DRIVE_MODE_IDLE  = 0x00
	CCS811_DRIVE_MODE_1SEC  = 0x01
	CCS811_DRIVE_MODE_10SEC = 0x02
	CCS811_DRIVE_MODE_60SEC = 0x03
	CCS811_DRIVE_MODE_250MS = 0x04
	//// CONSTANTs
	CCS811_HW_ID_CODE   = 0x81
	CCS811_REF_RESISTOR = 100000
	//// STATUS - Bitwise
	ERROR_BIT      = 0x01
	DATA_READY_BIT = 0x08
	APP_VALID_BIT  = 0x10
	FW_MODE_BIT    = 0x80
	//// ERROR - Bitwise
	WRITE_REG_INVALID = 0x01
	READ_REG_INVALID  = 0x02
	MEASMODE_INVALID  = 0x04
	MAX_RESISTANCE    = 0x08
	HEATER_FAULT      = 0x10
	HEATER_SUPPLY     = 0x20
)

Variables

View Source
var (
	InterruptMode      byte = 0
	InterruptThreshold byte = 0
	SamplingRate       byte = CCS811_DRIVE_MODE_10SEC
	Dev                *i2c.Device
)

Functions

func Begin

func Begin(d string, a int) bool

func ReadData

func ReadData(d string, a int) (uint16, uint16, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL