code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
try:
extra_coverage
except NameError:
print("SKIP")
raise SystemExit
import uerrno
import uio
data = extra_coverage()
# test hashing of str/bytes that have an invalid hash
print(data[0], data[1])
print(hash(data[0]))
print(hash(data[1]))
print(hash(bytes(data[0], "utf8")))
print(hash(str(data[1], "utf8")... | YifuLiu/AliOS-Things | components/py_engine/tests/unix/extra_coverage.py | Python | apache-2.0 | 2,694 |
try:
import ffi
except ImportError:
print("SKIP")
raise SystemExit
def ffi_open(names):
err = None
for n in names:
try:
mod = ffi.open(n)
return mod
except OSError as e:
err = e
raise err
libc = ffi_open(("libc.so", "libc.so.0", "libc.so.6"... | YifuLiu/AliOS-Things | components/py_engine/tests/unix/ffi_callback.py | Python | apache-2.0 | 648 |
# test ffi float support
try:
import ffi
except ImportError:
print("SKIP")
raise SystemExit
def ffi_open(names):
err = None
for n in names:
try:
mod = ffi.open(n)
return mod
except OSError as e:
err = e
raise err
libc = ffi_open(("libc.so",... | YifuLiu/AliOS-Things | components/py_engine/tests/unix/ffi_float.py | Python | apache-2.0 | 1,259 |
# test ffi float support
try:
import ffi
except ImportError:
print("SKIP")
raise SystemExit
def ffi_open(names):
err = None
for n in names:
try:
mod = ffi.open(n)
return mod
except OSError as e:
err = e
raise err
libm = ffi_open(("libm.so",... | YifuLiu/AliOS-Things | components/py_engine/tests/unix/ffi_float2.py | Python | apache-2.0 | 683 |
#include <stdint.h>
int8_t f8i(int8_t x) {
return x ^ 1;
}
uint8_t f8u(uint8_t x) {
return x ^ 1;
}
int16_t f16i(int16_t x) {
return x ^ 1;
}
uint16_t f16u(uint16_t x) {
return x ^ 1;
}
int32_t f32i(int32_t x) {
return x ^ 1;
}
uint32_t f32u(uint32_t x) {
return x ^ 1;
}
int64_t f64i(int6... | YifuLiu/AliOS-Things | components/py_engine/tests/unix/ffi_lib.c | C | apache-2.0 | 398 |
# test 8/16/32/64 bit signed/unsigned integer arguments and return types for ffi functions
# requires ffi_lib.c to be compiled as: $(CC) -shared -o ffi_lib.so ffi_lib.c
import uos, usys
try:
import ffi
except ImportError:
print("SKIP")
raise SystemExit
ffi_lib_filename = "./" + usys.argv[0].rsplit("/", 1... | YifuLiu/AliOS-Things | components/py_engine/tests/unix/ffi_types.py | Python | apache-2.0 | 1,316 |
try:
import utime as time
except ImportError:
import time
DAYS_PER_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
tzseconds = -time.mktime((1970, 1, 1, 14, 0, 0, 0, 0, 0))
def is_leap(year):
return (year % 4) == 0
def test():
seconds = 0
wday = 3 # Jan 1, 1970 was a Thursday
... | YifuLiu/AliOS-Things | components/py_engine/tests/unix/time.py | Python | apache-2.0 | 1,924 |
"""
ADC test for the CC3200 based boards.
"""
from machine import ADC
import os
mch = os.uname().machine
if "LaunchPad" in mch:
adc_pin = "GP5"
adc_channel = 3
elif "WiPy" in mch:
adc_pin = "GP3"
adc_channel = 1
else:
raise Exception("Board not supported!")
adc = ADC(0)
print(adc)
adc = ADC()
pri... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/adc.py | Python | apache-2.0 | 1,646 |
"""
I2C test for the CC3200 based boards.
A MPU-9150 sensor must be connected to the I2C bus.
"""
from machine import I2C
import os
import time
mch = os.uname().machine
if "LaunchPad" in mch:
i2c_pins = ("GP11", "GP10")
elif "WiPy" in mch:
i2c_pins = ("GP15", "GP10")
else:
raise Exception("Board not suppo... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/i2c.py | Python | apache-2.0 | 4,212 |
"""
wipy module test for the CC3200 based boards
"""
import os
import wipy
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
print(wipy.heartbeat() == True)
wipy.heartbeat(False)
print(wipy.heartbeat() == False)
wipy.heartbeat(True)
print(wipy.heart... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/modwipy.py | Python | apache-2.0 | 401 |
"""
os module test for the CC3200 based boards
"""
from machine import SD
import os
mch = os.uname().machine
if "LaunchPad" in mch:
sd_pins = ("GP16", "GP17", "GP15")
elif "WiPy" in mch:
sd_pins = ("GP10", "GP11", "GP15")
else:
raise Exception("Board not supported!")
sd = SD(pins=sd_pins)
os.mount(sd, "... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/os.py | Python | apache-2.0 | 2,917 |
"""
This test need a set of pins which can be set as inputs and have no external
pull up or pull down connected.
GP12 and GP17 must be connected together
"""
from machine import Pin
import os
mch = os.uname().machine
if "LaunchPad" in mch:
pin_map = [
"GP24",
"GP12",
"GP14",
"GP1... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/pin.py | Python | apache-2.0 | 5,135 |
"""
Pin IRQ test for the CC3200 based boards.
"""
from machine import Pin
import machine
import os
import time
mch = os.uname().machine
if "LaunchPad" in mch:
pins = ["GP16", "GP13"]
elif "WiPy" in mch:
pins = ["GP16", "GP13"]
else:
raise Exception("Board not supported!")
pin0 = Pin(pins[0], mode=Pin.OUT... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/pin_irq.py | Python | apache-2.0 | 2,813 |
"""
Reset script for the cc3200 boards
This is needed to force the board to reboot
with the default WLAN AP settings
"""
from machine import WDT
import time
import os
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
wdt = WDT(timeout=1000)
print(wd... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/reset/reset.py | Python | apache-2.0 | 342 |
"""
RTC test for the CC3200 based boards.
"""
from machine import RTC
import os
import time
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
rtc = RTC()
print(rtc)
print(rtc.now()[:6])
rtc = RTC(datetime=(2015, 8, 29, 9, 0, 0, 0, None))
print(rtc.... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/rtc.py | Python | apache-2.0 | 2,644 |
"""
SD card test for the CC3200 based boards.
"""
from machine import SD
import os
mch = os.uname().machine
if "LaunchPad" in mch:
sd_pins = ("GP16", "GP17", "GP15")
elif "WiPy" in mch:
sd_pins = ("GP10", "GP11", "GP15")
else:
raise Exception("Board not supported!")
sd = SD(pins=sd_pins)
print(sd)
sd.dei... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/sd.py | Python | apache-2.0 | 786 |
"""
RTC IRQ test for the CC3200 based boards.
"""
from machine import RTC
import machine
import os
import time
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
def rtc_ticks_ms(rtc):
timedate = rtc.now()
return (timedate[5] * 1000) + (time... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/skipped/rtc_irq.py | Python | apache-2.0 | 1,982 |
"""
SPI test for the CC3200 based boards.
"""
from machine import SPI
import os
mch = os.uname().machine
if "LaunchPad" in mch:
spi_pins = ("GP14", "GP16", "GP30")
elif "WiPy" in mch:
spi_pins = ("GP14", "GP16", "GP30")
else:
raise Exception("Board not supported!")
spi = SPI(0, SPI.MASTER, baudrate=20000... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/spi.py | Python | apache-2.0 | 3,833 |
import time
DAYS_PER_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
def is_leap(year):
return (year % 4) == 0
def test():
seconds = 0
wday = 5 # Jan 1, 2000 was a Saturday
for year in range(2000, 2049):
print("Testing %d" % year)
yday = 1
for month in range(1, ... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/time.py | Python | apache-2.0 | 3,272 |
"""
Timer test for the CC3200 based boards.
"""
from machine import Timer
import os
import time
mch = os.uname().machine
if "LaunchPad" in mch:
pwm_pin = "GP24"
elif "WiPy" in mch:
pwm_pin = "GP24"
else:
raise Exception("Board not supported!")
for i in range(4):
tim = Timer(i, mode=Timer.PERIODIC)
... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/timer.py | Python | apache-2.0 | 2,586 |
"""
UART test for the CC3200 based boards.
UART0 and UART1 must be connected together for this test to pass.
"""
from machine import UART
from machine import Pin
import os
import time
mch = os.uname().machine
if "LaunchPad" in mch:
uart_id_range = range(0, 2)
uart_pins = [
[("GP12", "GP13"), ("GP12",... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/uart.py | Python | apache-2.0 | 3,991 |
"""
UART IRQ test for the CC3200 based boards.
"""
from machine import UART
import os
import time
mch = os.uname().machine
if "LaunchPad" in mch:
uart_pins = [
[("GP12", "GP13"), ("GP12", "GP13", "GP7", "GP6")],
[("GP16", "GP17"), ("GP16", "GP17", "GP7", "GP6")],
]
elif "WiPy" in mch:
uart... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/uart_irq.py | Python | apache-2.0 | 3,569 |
"""
WDT test for the CC3200 based boards
"""
from machine import WDT
import time
# test the invalid cases first
try:
wdt = WDT(1)
except Exception:
print("Exception")
try:
wdt = WDT(0, 500)
except Exception:
print("Exception")
try:
wdt = WDT(1, timeout=2000)
except Exception:
print("Exceptio... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/wdt.py | Python | apache-2.0 | 540 |
"""
machine test for the CC3200 based boards.
"""
import machine
import os
from network import WLAN
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
wifi = WLAN()
print(machine)
machine.idle()
print(machine.freq() == (80000000,))
print(machine.uni... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/wlan/machine.py | Python | apache-2.0 | 747 |
"""
network server test for the CC3200 based boards.
"""
import os
import network
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
server = network.Server()
print(server.timeout() == 300)
print(server.isrunning() == True)
server.deinit()
print(ser... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/wlan/server.py | Python | apache-2.0 | 803 |
"""
WLAN test for the CC3200 based boards.
"""
from network import WLAN
import os
import time
import testconfig
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
def wait_for_connection(wifi, timeout=10):
while not wifi.isconnected() and timeou... | YifuLiu/AliOS-Things | components/py_engine/tests/wipy/wlan/wlan.py | Python | apache-2.0 | 4,131 |
/*
* Copyright (C) 2015-2021 Alibaba Group Holding Limited
*/
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#if AOS_COMP_CLI
#include "aos/cli.h"
#endif
#include "ramfs.h"
static void ramfs_example_fn(int argc, char **argv)
{
(void)argc;
(void)argv;
int... | YifuLiu/AliOS-Things | components/ramfs/example/ramfs_example.c | C | apache-2.0 | 1,231 |
/**
* @file ramfs.h
* @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited
*/
#ifndef FS_RAMFS_H
#define FS_RAMFS_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup ramfs_aos_api ramfs
* ramfs 对外API.
* @{
*/
/**
* ramfs文件系统注册接口
* @param[in] mount_path 该文件系统挂载路径
* @... | YifuLiu/AliOS-Things | components/ramfs/include/ramfs.h | C | apache-2.0 | 719 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef RAMFS_ADAPT_H
#define RAMFS_ADAPT_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief wrapper of MM allocation
*
* @param[in] size size of the mem to alloc
*
* @return NUll is error, other is memory address
*/
void *ramfs_mm_alloc(uint32... | YifuLiu/AliOS-Things | components/ramfs/internal/ramfs_adapt.h | C | apache-2.0 | 759 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef RAMFS_API_H
#define RAMFS_API_H
#include "ramfs_err.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint32_t st_mode;
uint32_t st_size;
uint8_t is_dir;
} ramfs_stat_t;
typedef enum {
RAMFS_MODE_WR = 0x01,
RAMFS_... | YifuLiu/AliOS-Things | components/ramfs/internal/ramfs_api.h | C | apache-2.0 | 6,127 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef RAMFS_ERR_H
#define RAMFS_ERR_H
#define RAMFS_OK 0
#define RAMFS_ERR_HW -10000 /* Low level hard ware error */
#define RAMFS_ERR_FS -10001 /* Error in the file system structure */
#define RAMFS_ERR_NOT_EXIST -10002 /... | YifuLiu/AliOS-Things | components/ramfs/internal/ramfs_err.h | C | apache-2.0 | 1,258 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#ifndef RAMFS_TYPES_H
#define RAMFS_TYPES_H
#include <stdint.h>
#include <unistd.h>
#define RAMFS_MAGIC 0x890910
#define RAMFS_LETTER 'U'
#define RAMFS_PATH_MAX 128
#define RAMFS_NAME_MAX RAMFS_PATH_MAX
#define RAMFS_LINK_MAX 1024
#d... | YifuLiu/AliOS-Things | components/ramfs/internal/ramfs_types.h | C | apache-2.0 | 1,417 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "ramfs_types.h"
#include "ramfs_api.h"
#include "ramfs_adapt.h"
#define RAMFS_LL_NODE_META_SIZE (sizeof(ramfs_ll_node_t *) + \
sizeo... | YifuLiu/AliOS-Things | components/ramfs/src/ramfs.c | C | apache-2.0 | 25,655 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include "k_api.h"
#include "ramfs_adapt.h"
void *ramfs_mm_alloc(uint32_t size)
{
return krhino_mm_alloc(size);
}
void ramfs_mm_free(void *ptr)
{
krhino_mm_free(ptr);
}
void *ramfs_mm_realloc(void *oldmem, uint32_t newsize)
{
return krhino... | YifuLiu/AliOS-Things | components/ramfs/src/ramfs_adapt.c | C | apache-2.0 | 353 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include "vfs_types.h"
#include "vfs_api.h"
#include "ramfs.h"
#include "ramfs_api.h"
#include "ramfs_adapt.h"
#include "ramfs_types.h"
#define MAX_RAMFS_FILE_NAME_BYTES 32
#define RAMFS_DEFAUL... | YifuLiu/AliOS-Things | components/ramfs/src/ramfs_vfs.c | C | apache-2.0 | 11,514 |
/*
* Copyright (C) 2020-2021 Alibaba Group Holding Limited
*/
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
#include "select.h"
#include "aos/vfs.h"
#if AOS_COMP_CLI
#include "aos/cli.h"
#endif
extern int vfs_test_device_init(void);
extern int vfs_test_device_deinit(void);
static void select_example()
{... | YifuLiu/AliOS-Things | components/select/example/select_example.c | C | apache-2.0 | 2,849 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "aos/list.h"
#include "aos/vfs.h"
#include "poll.h"
#define CACHE_COUNT 5
#define MK_CMD(c, l) ((l << 4) | (c))
#define _GET_LEN(cmd) ((cmd) >> 4)
#define _G... | YifuLiu/AliOS-Things | components/select/example/test_device.c | C | apache-2.0 | 4,449 |
/*
* Copyright (C) 2020-2021 Alibaba Group Holding Limited
*/
#ifndef AOS_SELECT_H
#define AOS_SELECT_H
#include <poll.h>
#undef POLLIN
#define POLLIN 0x001
#undef POLLOUT
#define POLLOUT 0x004
#undef POLLERR
#define POLLERR 0x008
int aos_poll(struct pollfd *fds, int nfds, int timeout);
int aos_selec... | YifuLiu/AliOS-Things | components/select/include/select.h | C | apache-2.0 | 437 |
/*
* Copyright (C) 2020-2021 Alibaba Group Holding Limited
*/
#include <stdbool.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
#include <errno.h>
#include "aos/kernel.h"
#include "aos/vfs.h"
#include <select.h>
#ifndef CONFIG_AOS_LWIP
#define CONFIG_NO_TCPIP
#endif
#ifdef CONFIG_NO_TCPIP
struct poll... | YifuLiu/AliOS-Things | components/select/poll/poll.c | C | apache-2.0 | 4,919 |
/*
* Copyright (C) 2020-2021 Alibaba Group Holding Limited
*/
#include <stdbool.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
#include <errno.h>
#include <poll.h>
#include "aos/kernel.h"
#include "aos/vfs.h"
#include "aos/list.h"
#include "sys/socket.h"
#include <select.h>
#define WRITE_VAL 1
#ifn... | YifuLiu/AliOS-Things | components/select/select/select.c | C | apache-2.0 | 6,660 |
ifeq ($(AOS_SENSOR_ACC_ADI_ADXL372),y)
$(NAME)_SOURCES += drv/drv_acc_adi_adxl372.c
endif
ifeq ($(AOS_SENSOR_ACC_ADI_ADXL345),y)
$(NAME)_SOURCES += drv/drv_acc_adi_adxl345.c
endif
ifeq ($(AOS_SENSOR_ACC_ADI_ADXL355),y)
$(NAME)_SOURCES += drv/drv_acc_adi_adxl355.c
endif
ifeq ($(AOS_SENSOR_ACC_BOSCH_BMA253),y)
$(NAME)_S... | YifuLiu/AliOS-Things | components/sensor/drv.mk | Makefile | apache-2.0 | 11,475 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define ADXL345_I2C_ADDR1 (0x1D)
#define ADXL345_I2C_ADDR2 (0x53)
#define ADXL345_I2C_ADDR_TRANS(n) ((n) << 1)
#... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_adi_adxl345.c | C | apache-2.0 | 12,512 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define ADXL355_I2C_ADDR1 (0x1D)
#define ADXL355_I2C_ADDR2 (0x53)
#define ADXL355_I2C_ADDR_TRANS(n) ((n) << 1)
#... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_adi_adxl355.c | C | apache-2.0 | 14,475 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define ADXL372_I2C_ADDR1 (0x1D)
#define ADXL372_I2C_ADDR2 (0x53)
#define ADXL372_I2C_ADDR_TRANS(n) ((n) << 1)
#... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_adi_adxl372.c | C | apache-2.0 | 11,476 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMA253_I2C_ADDR1 (0x18)
#define BMA253_I2C_ADDR2 (0x19)
#define BMA253_I2C_ADDR3 (0x10)
#define BMA253_I2... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_bosch_bma253.c | C | apache-2.0 | 25,794 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMA280_I2C_ADDR1 (0x18)
#define BMA280_I2C_ADDR2 (0x19)
#define BM... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_bosch_bma280.c | C | apache-2.0 | 21,010 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include "aos/kernel.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMA421_I2C_ADDR_LOW (0x18)
#define BMA421_I2C_ADDR_HIGH (0x19)
#define... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_bosch_bma421.c | C | apache-2.0 | 14,789 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include "aos/kernel.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMA422_I2C_ADDR_LOW (0x18)
#define BMA422_I2C_ADDR_HIGH (0x19)
#define... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_bosch_bma422.c | C | apache-2.0 | 14,787 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include "aos/kernel.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMA455_I2C_ADDR_LOW (0x18)
#define BMA455_I2C_ADDR_HIGH (0x19)
#define... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_bosch_bma455.c | C | apache-2.0 | 14,789 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include "aos/kernel.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMA456_I2C_ADDR_LOW (0x18)
#define BMA456_I2C_ADDR_HIGH (0x19)
#define B... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_bosch_bma456.c | C | apache-2.0 | 14,780 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMI055_ACC_I2C_ADDR1 (0x18)
#define BMI055_ACC_I2C_ADDR2 (0x19)
#d... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_bosch_bmi055.c | C | apache-2.0 | 35,853 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include "aos/kernel.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMI088_ACC_I2C_ADDR_LOW (0x18)
#define BMI088_ACC_I2C_ADDR_HIGH (0x19)... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_bosch_bmi088.c | C | apache-2.0 | 30,290 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
/*********************************************************************************************
*
*Copyright (C) 2016 - 2020 Bosch Sensortec GmbH
*Redistribution and use in source and binary forms, with or without
*modification, are permitted provided th... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_bosch_bmi120.c | C | apache-2.0 | 40,642 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
/*********************************************************************************************
*
*Copyright (C) 2016 - 2020 Bosch Sensortec GmbH
*Redistribution and use in source and binary forms, with or without
*modification, are permitted provided th... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_bosch_bmi160.c | C | apache-2.0 | 40,700 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
/*********************************************************************************************
*
*Copyright (C) 2016 - 2020 Bosch Sensortec GmbH
*Redistribution and use in source and binary forms, with or without
*modification, are permitted provided th... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_bosch_bmi260.c | C | apache-2.0 | 65,350 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
/*#define SH200L_DEBUG*/
#ifdef SH200L_DEBUG
#define SH200L_LOG LOG
#else
#define SH200L_LOG
#endif
#define SH200... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_senodia_sh200l.c | C | apache-2.0 | 29,119 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
/*#define SH200Q_DEBUG*/
#ifdef SH200Q_DEBUG
#define SH200Q_LOG LOG
#else
#define SH200Q_LOG
#endif
#define SH200... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_senodia_sh200q.c | C | apache-2.0 | 29,106 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LSM6DS3_I2C_ADDR1 (0x6A)
#define LSM6DS3_I2C_ADDR2 (0x6B)
#define LSM6DS... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_st_lsm6ds3.c | C | apache-2.0 | 40,823 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LSM6DS3TR_C_I2C_ADDR1 (0x6A)
#define LSM6DS3TR_C_I2C_ADDR2 (0x6B)
#defin... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_st_lsm6ds3tr_c.c | C | apache-2.0 | 42,819 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ulog/ulog.h"
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LSM6DSL_I2C_ADDR1 (0x6A)
#define LSM6DSL_I2C_ADDR2 (0x6B)
#define LSM6DSL_I2C_AD... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_st_lsm6dsl.c | C | apache-2.0 | 26,685 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LSM6DSM_I2C_ADDR1 (0x6A)
#define LSM6DSM_I2C_ADDR2 (0x6B)
#define LSM6DS... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_st_lsm6dsm.c | C | apache-2.0 | 41,679 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LSM6DSOQ_I2C_ADDR1 (0x6A)
#define LSM6DSOQ_I2C_ADDR2 (0x6B)
#define LSM6... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_st_lsm6dsoq.c | C | apache-2.0 | 40,218 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LSM6DSR_I2C_ADDR1 (0x6A)
#define LSM6DSR_I2C_ADDR2 (0x6B)
#define LSM6DS... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_gyro_st_lsm6dsr.c | C | apache-2.0 | 26,222 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LSM303AGR_MAG_I2C_ADDR1 0x1E
#define LSM303AGR_MAG_I2C_ADDR_TRANS(n) ((n)<<1)
#define... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_mag_st_lsm303agr.c | C | apache-2.0 | 42,978 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define NSA_REG_SPI_I2C 0x00
#define NSA_REG_WHO_AM_I ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_mir3_da213B.c | C | apache-2.0 | 9,549 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define NSA_REG_SPI_I2C 0x00
#define NSA_REG_WHO_AM_I ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_mir3_da215.c | C | apache-2.0 | 9,665 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "ulog/ulog.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define NSA_REG_SPI_I2C 0x00
#define NSA_REG_WHO_AM_I 0x01
#define NSA_REG_ACC_X_LSB 0x0... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_mir3_da217.c | C | apache-2.0 | 11,591 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define NSA_REG_SPI_I2C 0x00
#define NSA_REG_WHO_AM_I ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_mir3_da270.c | C | apache-2.0 | 12,735 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define NSA_REG_SPI_I2C 0x00
#define NSA_REG_WHO_AM_I ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_mir3_da312B.c | C | apache-2.0 | 9,549 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define NSA_REG_SPI_I2C 0x00
#define NSA_REG_WHO_AM_I ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_mir3_da380B.c | C | apache-2.0 | 9,550 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define AIS328DQ_I2C_ADDR1 (0x18)
#define AIS328DQ_I2C_ADDR2 (0x19)
#define AIS328... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_ais328dq.c | C | apache-2.0 | 11,548 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define H3LIS100DL_I2C_ADDR1 (0x18)
#define H3LIS100DL_I2C_ADDR2 (0x19)
#define H3... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_h3lis100dl.c | C | apache-2.0 | 8,894 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define H3LIS331DL_I2C_ADDR1 (0x18)
#define H3LIS331DL_I2C_ADDR2 (0x19)
#define H3... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_h3lis331dl.c | C | apache-2.0 | 12,179 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LIS2DH12_I2C_ADDR1 (0x18)
#define LIS2DH12_I2C_ADDR2 (0x19)
#define LIS2... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_lis2dh12.c | C | apache-2.0 | 20,973 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LIS2DW12_I2C_ADDR1 (0x18)
#define LIS2DW12_I2C_ADDR2 (0x19)
#define LIS2... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_lis2dw12.c | C | apache-2.0 | 21,125 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LIS2HH12_I2C_ADDR1 (0x1E)
#define LIS2HH12_I2C_ADDR2 (0x1D)
#define LIS2... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_lis2hh12.c | C | apache-2.0 | 11,900 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LIS331HH_I2C_ADDR1 (0x18)
#define LIS331HH_I2C_ADDR2 (0x19)
#define LIS331... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_lis331hh.c | C | apache-2.0 | 10,949 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LIS3DH_I2C_ADDR1 (0x18)
#define LIS3DH_I2C_ADDR2 (0x19)
#define LIS3DH_I... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_lis3dh.c | C | apache-2.0 | 20,581 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define N2DM_I2C_ADDR1 (0x8)
#define N2DM_I2C_ADDR2 (0x9)
#define N2DM_I2C_ADDR_... | YifuLiu/AliOS-Things | components/sensor/drv/drv_acc_st_n2dm.c | C | apache-2.0 | 20,112 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "ulog/ulog.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define TCS3400_ENABLE 0x80
#define TCS3400_ALS_TIME 0x81
#define TCS3400_WAIT_TIME 0x83
... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_ams_tcs3400.c | C | apache-2.0 | 20,018 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
/*******************************************************************************
********************************* MACROS **********************************
********************... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_liteon_ltr303.c | C | apache-2.0 | 20,755 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LTR568_I2C_SLAVE_ADDR 0x23
#define LTR568_ALS_AVE_LIMIT 0x7E /* ALS digital averaging limit */
#define LTR568_ALS_AVE_FAC ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_liteon_ltr568.c | C | apache-2.0 | 31,450 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define TMD2725_REG_ENABLE 0x80
#define TMD2725_REG_ATIME 0x81
#define TMD2725_REG_PTIME 0x82
#define TMD2725_REG_... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_ps_ams_tmd2725.c | C | apache-2.0 | 28,164 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LTR507_I2C_SLAVE_ADDR 0x23
#define LTR507_ALS_CONTR 0x80 /* ALS operation mode, SW reset */
#define LTR507_PS_CONTR ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_ps_liteon_ltr507.c | C | apache-2.0 | 24,492 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "ulog/ulog.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LTR553_ALS_CONTR 0x80 /* ALS operation mode, SW reset */
#define LTR553_PS_CONTR... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_ps_liteon_ltr553.c | C | apache-2.0 | 21,206 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LTR559_I2C_SLAVE_ADDR 0x23
#define LTR559_ALS_CONTR 0x80
#define LTR559_PS_CONTR 0x81 ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_ps_liteon_ltr559.c | C | apache-2.0 | 29,759 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
/************ define parameter for register ************/
#define REG_SP_INT_RESET (0xE1)
#define REG_SP_IMM_STOP... | YifuLiu/AliOS-Things | components/sensor/drv/drv_als_rohm_bh1730.c | C | apache-2.0 | 12,262 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "ulog/ulog.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define BMP280_TEMPERATURE_CALIB_DIG_T1_LSB_REG (0x88)
#define BMP280_TEMPERATURE_CALIB... | YifuLiu/AliOS-Things | components/sensor/drv/drv_baro_bosch_bmp280.c | C | apache-2.0 | 27,217 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
/*********************************************************************************************
*
*Copyright (C) 2016 - 2020 Bosch Sensortec GmbH
*Redistribution and use in source and binary forms, with or without
*modification, are permitted provided th... | YifuLiu/AliOS-Things | components/sensor/drv/drv_baro_bosch_bmp38x.c | C | apache-2.0 | 28,974 |
/* The MIT License
Copyright(c) 2018 Infineon Technologies AG
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, mer... | YifuLiu/AliOS-Things | components/sensor/drv/drv_baro_ifx_dps310.c | C | apache-2.0 | 38,441 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
* Edit wanjiang-yan 2018-6-24
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
//1.8V offset=0,2.8v offset= -0.6
//#define VALUE_OFFSET //modify by laoyan
#ifdef V... | YifuLiu/AliOS-Things | components/sensor/drv/drv_baro_rohm_bm1383a.c | C | apache-2.0 | 12,134 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
/* ST BARO SENSOR REGISTER MAP */
#define LPS22HB_BIT(x) ((uint8_t)x)
#define LPS22HB_ADDRESS (uint8_t)0xB8
#defi... | YifuLiu/AliOS-Things | components/sensor/drv/drv_baro_st_lps22hb.c | C | apache-2.0 | 13,144 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
/* ST BARO SENSOR REGISTER MAP */
#define LPS33HB_BIT(x) ((uint8_t)x)
#define LPS33HB_ADDRESS ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_baro_st_lps33hb.c | C | apache-2.0 | 14,059 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
/* ST BARO SENSOR REGISTER MAP */
#define LPS35HB_BIT(x) ((uint8_t)x)
#define LPS35HB_ADDRESS ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_baro_st_lps35hb.c | C | apache-2.0 | 14,058 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_hal.h"
#define LSM6DSL_ACC_MUL 1000
#define MPU9250_GYRO_SENSITIVITY_2000DPS 70000
static int32_t cur_acc_factor = 61;
static int32_t cur_gyro_factor... | YifuLiu/AliOS-Things | components/sensor/drv/drv_canbus_inv_mpu9250.c | C | apache-2.0 | 3,679 |
/*
* Copyright (C) 2018 Sensirion Inc.
* Author: Johannes Winkelmann, jwi@sensirion.com
*
* Driver for SCD30
* Based on SGP30 driver, and arduino-scd library
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define POLYNOMIAL 0x... | YifuLiu/AliOS-Things | components/sensor/drv/drv_co2_sensirion_scd30.c | C | apache-2.0 | 7,278 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define ADPD188GG_I2C_ADDR1 (0x64)
#define ADPD188GG_I2C_ADDR_TRANS(n) ((n)<<1)
#define ADPD188... | YifuLiu/AliOS-Things | components/sensor/drv/drv_ecg_adi_adpd188gg.c | C | apache-2.0 | 16,626 |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*
*
*/
#include "gps_parse.h"
#include "sensor_hal.h"
#ifdef AOS_ATCMD
#include <at/at.h>
#endif
#define GPS_EV_UDATA (0x40)
#define GPS_DEV_READ (1)
#define GPS_DEV_PROC (2)
#define GPS_... | YifuLiu/AliOS-Things | components/sensor/drv/drv_gps_simcom_sim868.c | C | apache-2.0 | 17,396 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
#define LTR91100_I2C_SLAVE_ADDR 0x23
#define LTR91100_CTRL 0x80 /* SW reset control */
#define LTR91100_PS_CTRL ... | YifuLiu/AliOS-Things | components/sensor/drv/drv_gs_liteon_ltr91100.c | C | apache-2.0 | 25,727 |
/*
* Copyright (C) 2015-2018 Alibaba Group Holding Limited
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aos/kernel.h"
#include "sensor_drv_api.h"
#include "sensor_hal.h"
//#include "soc_init.h"
#define PAJ7620_SLAVE_ADDRESS (0x73 << 1)
#define BIT(x) 1 << x
// REGISTER DESCRI... | YifuLiu/AliOS-Things | components/sensor/drv/drv_gs_pixart_paj7620.c | C | apache-2.0 | 15,478 |