-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmos.yml
56 lines (48 loc) · 2.29 KB
/
mos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
author: Pim van Pelt <pim@ipng.nl>
type: lib
description: Mongoose OS library implementing an I2C driver for ADE7953
version: 1.0
sources:
- src/mgos_ade7953.c
includes:
- include
conds:
- when: cdefs.MGOS_ADE7953_ENABLE_SPI == "1"
apply:
sources:
- src/mgos_ade7953_spi.c
libs:
- location: https://github.com/mongoose-os-libs/spi
cdefs:
MGOS_ADE7953_SPI_FREQ: 1000000
- when: cdefs.MGOS_ADE7953_ENABLE_I2C == "1"
apply:
sources:
- src/mgos_ade7953_i2c.c
libs:
- location: https://github.com/mongoose-os-libs/i2c
config_schema:
# Abstract data, saved in separate storage
- ["ade7953", "o", {title: "ADE7953 driver configuration", abstract: true}]
- ["ade7953.voltage_scale", "f", {title: "Scaling factor to convert voltage channel ADC readings to voltage"}]
- ["ade7953.voltage_offset", "f", {title: "Voltage measurement offset, volts"}]
- ["ade7953.current_scale_0", "f", {title: "Scaling factor to convert current channel ADC readings to amperes, channel 0"}]
- ["ade7953.current_scale_1", "f", {title: "Scaling factor to convert current channel ADC readings to amperes, channel 1"}]
- ["ade7953.current_offset_0", "f", {title: "Current measurement offsets, in amps, channel 0"}]
- ["ade7953.current_offset_1", "f", {title: "Current measurement offsets, in amps, channel 1"}]
- ["ade7953.apower_scale_0", "f", {title: "Scaling factor to convert active power to watts, channel 0"}]
- ["ade7953.apower_scale_1", "f", {title: "Scaling factor to convert active power to watts, channel 1"}]
- ["ade7953.aenergy_scale_0", "f", {title: "Scaling factor to convert active energy to watt-hours, channel 0"}]
- ["ade7953.aenergy_scale_1", "f", {title: "Scaling factor to convert active energy to watt-hours, channel 1"}]
- ["ade7953.voltage_pga_gain", "i", {title: "Voltage PGA gain, see enum ade7953_pga_gain in mgos_ade7953.h"}]
- ["ade7953.current_pga_gain_0", "i", {title: "Current PGA gain, channel 0, see enum ade7953_pga_gain in mgos_ade7953.h"}]
- ["ade7953.current_pga_gain_1", "i", {title: "Current PGA gain, channel 1, see enum ade7953_pga_gain in mgos_ade7953.h"}]
cdefs:
MGOS_ADE7953_ENABLE_SPI: 0
MGOS_ADE7953_ENABLE_I2C: 1
tags:
- c
- i2c
- hw
- docs:drivers:ADE7953 I2C
manifest_version: 2017-09-29