mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-29 19:17:28 +08:00
[modules] use configure for I2C_DEV
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
(AMS 5812-0003-D)
|
(AMS 5812-0003-D)
|
||||||
(AMS 5812-0001-D)
|
(AMS 5812-0001-D)
|
||||||
</description>
|
</description>
|
||||||
<define name="AIRSPEED_AMSYS_I2C_DEV" value="i2c0" description="change default i2c peripheral"/>
|
<configure name="AIRSPEED_AMSYS_I2C_DEV" value="i2c0" description="change default i2c peripheral"/>
|
||||||
<define name="AIRSPEED_AMSYS_MAXPRESURE" value="2068" description="max sensor pressure (Pa) (default: 2068 for AMS 5812-0003-D)(for AMS 5812-0001-D use 1034)"/>
|
<define name="AIRSPEED_AMSYS_MAXPRESURE" value="2068" description="max sensor pressure (Pa) (default: 2068 for AMS 5812-0003-D)(for AMS 5812-0001-D use 1034)"/>
|
||||||
<define name="AIRSPEED_AMSYS_SCALE" value="1.0" description="sensor scale factor (default: 1.0)"/>
|
<define name="AIRSPEED_AMSYS_SCALE" value="1.0" description="sensor scale factor (default: 1.0)"/>
|
||||||
<define name="AIRSPEED_AMSYS_FILTER" value="0." description="sensor filter (default: 0. max:1)"/>
|
<define name="AIRSPEED_AMSYS_FILTER" value="0." description="sensor filter (default: 0. max:1)"/>
|
||||||
@@ -34,6 +34,13 @@
|
|||||||
<event fun="AirspeedAmsysEvent()"/>
|
<event fun="AirspeedAmsysEvent()"/>
|
||||||
|
|
||||||
<makefile>
|
<makefile>
|
||||||
|
<raw>
|
||||||
|
AIRSPEED_AMSYS_I2C_DEV ?= i2c0
|
||||||
|
AIRSPEED_AMSYS_I2C_DEV_LOWER=$(shell echo $(AIRSPEED_AMSYS_I2C_DEV) | tr A-Z a-z)
|
||||||
|
AIRSPEED_AMSYS_I2C_DEV_UPPER=$(shell echo $(AIRSPEED_AMSYS_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(AIRSPEED_AMSYS_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="AIRSPEED_AMSYS_I2C_DEV" value="$(AIRSPEED_AMSYS_I2C_DEV_LOWER)"/>
|
||||||
<file name="airspeed_amsys.c"/>
|
<file name="airspeed_amsys.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
- Yellow wire: SDA
|
- Yellow wire: SDA
|
||||||
- Brown wire: SCL
|
- Brown wire: SCL
|
||||||
</description>
|
</description>
|
||||||
<define name="AIRSPEED_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
|
<configure name="AIRSPEED_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
|
||||||
<define name="AIRSPEED_ETS_OFFSET" value="offset" description="sensor reading offset for sensor in proprietary mode (default: 0)"/>
|
<define name="AIRSPEED_ETS_OFFSET" value="offset" description="sensor reading offset for sensor in proprietary mode (default: 0)"/>
|
||||||
<define name="AIRSPEED_ETS_SCALE" value="scale" description="sensor scale factor for sensor in proprietary mode (default: 1.8)"/>
|
<define name="AIRSPEED_ETS_SCALE" value="scale" description="sensor scale factor for sensor in proprietary mode (default: 1.8)"/>
|
||||||
<define name="AIRSPEED_ETS_START_DELAY" value="delay" description="set initial start delay in seconds"/>
|
<define name="AIRSPEED_ETS_START_DELAY" value="delay" description="set initial start delay in seconds"/>
|
||||||
@@ -35,6 +35,13 @@
|
|||||||
<event fun="AirspeedEtsEvent()"/>
|
<event fun="AirspeedEtsEvent()"/>
|
||||||
|
|
||||||
<makefile>
|
<makefile>
|
||||||
|
<raw>
|
||||||
|
AIRSPEED_ETS_I2C_DEV ?= i2c0
|
||||||
|
AIRSPEED_ETS_I2C_DEV_LOWER=$(shell echo $(AIRSPEED_ETS_I2C_DEV) | tr A-Z a-z)
|
||||||
|
AIRSPEED_ETS_I2C_DEV_UPPER=$(shell echo $(AIRSPEED_ETS_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(AIRSPEED_ETS_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="AIRSPEED_ETS_I2C_DEV" value="$(AIRSPEED_ETS_I2C_DEV_LOWER)"/>
|
||||||
<file name="airspeed_ets.c"/>
|
<file name="airspeed_ets.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Baro AMSYS (I2C).
|
Baro AMSYS (I2C).
|
||||||
Module to read a Amsys AMS 5812-0150-A barometric sensor via I2C.
|
Module to read a Amsys AMS 5812-0150-A barometric sensor via I2C.
|
||||||
</description>
|
</description>
|
||||||
<define name="BARO_AMSYS_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
<configure name="BARO_AMSYS_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
||||||
<define name="BARO_AMSYS_MAX_PRESSURE" value="103400" description="max sensor pressure (Pa) (default: 103400 for -0150)"/>
|
<define name="BARO_AMSYS_MAX_PRESSURE" value="103400" description="max sensor pressure (Pa) (default: 103400 for -0150)"/>
|
||||||
<define name="BARO_AMSYS_SCALE" value="1" description="sensor scale factor (default: 1)"/>
|
<define name="BARO_AMSYS_SCALE" value="1" description="sensor scale factor (default: 1)"/>
|
||||||
<define name="BARO_AMSYS_FILTER" value="0." description="sensor filter (default: 0. max:1)"/>
|
<define name="BARO_AMSYS_FILTER" value="0." description="sensor filter (default: 0. max:1)"/>
|
||||||
@@ -30,6 +30,13 @@
|
|||||||
<event fun="BaroAmsysEvent()"/>
|
<event fun="BaroAmsysEvent()"/>
|
||||||
|
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
BARO_AMSYS_I2C_DEV ?= i2c0
|
||||||
|
BARO_AMSYS_I2C_DEV_LOWER=$(shell echo $(BARO_AMSYS_I2C_DEV) | tr A-Z a-z)
|
||||||
|
BARO_AMSYS_I2C_DEV_UPPER=$(shell echo $(BARO_AMSYS_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(BARO_AMSYS_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="BARO_AMSYS_I2C_DEV" value="$(BARO_AMSYS_I2C_DEV_LOWER)"/>
|
||||||
<file name="baro_amsys.c"/>
|
<file name="baro_amsys.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<module name="baro_bmp" dir="sensors">
|
<module name="baro_bmp" dir="sensors">
|
||||||
<doc>
|
<doc>
|
||||||
<description>Bosch BMP085 pressure sensor</description>
|
<description>Bosch BMP085 pressure sensor</description>
|
||||||
<define name="BMP_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
<configure name="BMP_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
||||||
<define name="SENSOR_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
|
<define name="SENSOR_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
@@ -13,6 +13,13 @@
|
|||||||
<periodic fun="baro_bmp_periodic()" freq="15"/>
|
<periodic fun="baro_bmp_periodic()" freq="15"/>
|
||||||
<event fun="baro_bmp_event()"/>
|
<event fun="baro_bmp_event()"/>
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
BMP_I2C_DEV ?= i2c0
|
||||||
|
BMP_I2C_DEV_LOWER=$(shell echo $(BMP_I2C_DEV) | tr A-Z a-z)
|
||||||
|
BMP_I2C_DEV_UPPER=$(shell echo $(BMP_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(BMP_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="BMP_I2C_DEV" value="$(BMP_I2C_DEV_LOWER)"/>
|
||||||
<file name="baro_bmp.c"/>
|
<file name="baro_bmp.c"/>
|
||||||
<file name="bmp085.c" dir="peripherals"/>
|
<file name="bmp085.c" dir="peripherals"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
- Brown wire: SCL
|
- Brown wire: SCL
|
||||||
|
|
||||||
</description>
|
</description>
|
||||||
<define name="BARO_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
|
<configure name="BARO_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
|
||||||
<define name="BARO_ETS_SCALE" value="scale" description="scale factor to convert raw ADC measurement to pressure in Pascal (default: 37.5)"/>
|
<define name="BARO_ETS_SCALE" value="scale" description="scale factor to convert raw ADC measurement to pressure in Pascal (default: 37.5)"/>
|
||||||
<define name="BARO_ETS_ALT_SCALE" value="scale" description="scale factor to convert raw ADC measurement to altitude change in meters (default: 0.32)"/>
|
<define name="BARO_ETS_ALT_SCALE" value="scale" description="scale factor to convert raw ADC measurement to altitude change in meters (default: 0.32)"/>
|
||||||
<define name="BARO_ETS_ALT_SCALE" value="scale" description="pressure offset in Pascal when converting raw adc to real pressure (default: 101325.0="/>
|
<define name="BARO_ETS_ALT_SCALE" value="scale" description="pressure offset in Pascal when converting raw adc to real pressure (default: 101325.0="/>
|
||||||
@@ -34,6 +34,13 @@
|
|||||||
<event fun="BaroEtsEvent()"/>
|
<event fun="BaroEtsEvent()"/>
|
||||||
|
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
BARO_ETS_I2C_DEV ?= i2c0
|
||||||
|
BARO_ETS_I2C_DEV_LOWER=$(shell echo $(BARO_ETS_I2C_DEV) | tr A-Z a-z)
|
||||||
|
BARO_ETS_I2C_DEV_UPPER=$(shell echo $(BARO_ETS_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(BARO_ETS_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="BARO_ETS_I2C_DEV" value="$(BARO_ETS_I2C_DEV_LOWER)"/>
|
||||||
<file name="baro_ets.c"/>
|
<file name="baro_ets.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<module name="baro_hca" dir="sensors">
|
<module name="baro_hca" dir="sensors">
|
||||||
<doc>
|
<doc>
|
||||||
<description>Baro sensortechnics HCA (I2C)</description>
|
<description>Baro sensortechnics HCA (I2C)</description>
|
||||||
<define name="BARO_HCA_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
<configure name="BARO_HCA_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
||||||
</doc>
|
</doc>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
@@ -14,6 +14,13 @@
|
|||||||
<event fun="BaroHcaEvent()"/>
|
<event fun="BaroHcaEvent()"/>
|
||||||
|
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
BARO_HCA_I2C_DEV ?= i2c0
|
||||||
|
BARO_HCA_I2C_DEV_LOWER=$(shell echo $(BARO_HCA_I2C_DEV) | tr A-Z a-z)
|
||||||
|
BARO_HCA_I2C_DEV_UPPER=$(shell echo $(BARO_HCA_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(BARO_HCA_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="BARO_HCA_I2C_DEV" value="$(BARO_HCA_I2C_DEV_LOWER)"/>
|
||||||
<file name="baro_hca.c"/>
|
<file name="baro_hca.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Baro MS5611 (I2C)
|
Baro MS5611 (I2C)
|
||||||
Measurement Specialties MS5611-01BA pressure sensor (I2C)
|
Measurement Specialties MS5611-01BA pressure sensor (I2C)
|
||||||
</description>
|
</description>
|
||||||
<define name="MS5611_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
<configure name="MS5611_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
||||||
<define name="SENSOR_SYNC_SEND" description="flag to enable sending BARO_MS5611 message on every new measurement"/>
|
<define name="SENSOR_SYNC_SEND" description="flag to enable sending BARO_MS5611 message on every new measurement"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
@@ -17,6 +17,13 @@
|
|||||||
<periodic fun="baro_ms5611_periodic_check()" freq="40"/>
|
<periodic fun="baro_ms5611_periodic_check()" freq="40"/>
|
||||||
<event fun="baro_ms5611_event()"/>
|
<event fun="baro_ms5611_event()"/>
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
MS5611_I2C_DEV ?= i2c0
|
||||||
|
MS5611_I2C_DEV_LOWER=$(shell echo $(MS5611_I2C_DEV) | tr A-Z a-z)
|
||||||
|
MS5611_I2C_DEV_UPPER=$(shell echo $(MS5611_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(MS5611_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="MS5611_I2C_DEV" value="$(MS5611_I2C_DEV_LOWER)"/>
|
||||||
<file name="baro_ms5611_i2c.c"/>
|
<file name="baro_ms5611_i2c.c"/>
|
||||||
<file name="ms5611.c" dir="peripherals"/>
|
<file name="ms5611.c" dir="peripherals"/>
|
||||||
<file name="ms5611_i2c.c" dir="peripherals"/>
|
<file name="ms5611_i2c.c" dir="peripherals"/>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<module name="baro_scp_i2c" dir="sensors">
|
<module name="baro_scp_i2c" dir="sensors">
|
||||||
<doc>
|
<doc>
|
||||||
<description>VTI SCP1000 pressure sensor (I2C)</description>
|
<description>VTI SCP1000 pressure sensor (I2C)</description>
|
||||||
<define name="SCP_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
<configure name="SCP_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
||||||
<define name="SENSOR_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
|
<define name="SENSOR_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
@@ -13,6 +13,13 @@
|
|||||||
<periodic fun="baro_scp_periodic()" freq="1.8"/>
|
<periodic fun="baro_scp_periodic()" freq="1.8"/>
|
||||||
<event fun="baro_scp_event()"/>
|
<event fun="baro_scp_event()"/>
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
SCP_I2C_DEV ?= i2c0
|
||||||
|
SCP_I2C_DEV_LOWER=$(shell echo $(SCP_I2C_DEV) | tr A-Z a-z)
|
||||||
|
SCP_I2C_DEV_UPPER=$(shell echo $(SCP_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(SCP_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="SCP_I2C_DEV" value="$(SCP_I2C_DEV_LOWER)"/>
|
||||||
<file name="baro_scp_i2c.c"/>
|
<file name="baro_scp_i2c.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
Using the PAYLOAD_COMMAND, all functions of the camera can be controlled.
|
Using the PAYLOAD_COMMAND, all functions of the camera can be controlled.
|
||||||
It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.
|
It can trigger photos based on GPS distance, time or circle radius in both fixedwings and rotorcraft.
|
||||||
</description>
|
</description>
|
||||||
|
<configure name="ATMEGA_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
||||||
<define name="DC_SHOOT_ON_BUTTON_RELEASE" />
|
<define name="DC_SHOOT_ON_BUTTON_RELEASE" />
|
||||||
<define name="DC_SHOT_SYNC_SEND" value="TRUE|FALSE" description="send DC_SHOT message when photo was taken (default: TRUE)"/>
|
<define name="DC_SHOT_SYNC_SEND" value="TRUE|FALSE" description="send DC_SHOT message when photo was taken (default: TRUE)"/>
|
||||||
</doc>
|
</doc>
|
||||||
@@ -26,10 +27,15 @@
|
|||||||
<datalink message="PAYLOAD_COMMAND" fun="ParseCameraCommand()"/>
|
<datalink message="PAYLOAD_COMMAND" fun="ParseCameraCommand()"/>
|
||||||
|
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
ATMEGA_I2C_DEV ?= i2c0
|
||||||
|
ATMEGA_I2C_DEV_LOWER=$(shell echo $(ATMEGA_I2C_DEV) | tr A-Z a-z)
|
||||||
|
ATMEGA_I2C_DEV_UPPER=$(shell echo $(ATMEGA_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(ATMEGA_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="ATMEGA_I2C_DEV" value="$(ATMEGA_I2C_DEV_LOWER)"/>
|
||||||
<file name="atmega_i2c_cam_ctrl.c"/>
|
<file name="atmega_i2c_cam_ctrl.c"/>
|
||||||
<file name="dc.c"/>
|
<file name="dc.c"/>
|
||||||
<define name="ATMEGA_I2C_DEV" value="i2c0"/>
|
|
||||||
<define name="USE_I2C0" value="1"/>
|
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
<makefile target="sim">
|
<makefile target="sim">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<module name="ezcurrent" dir="sensors">
|
<module name="ezcurrent" dir="sensors">
|
||||||
<doc>
|
<doc>
|
||||||
<description>EzOSD Current sensor (I2C).</description>
|
<description>EzOSD Current sensor (I2C).</description>
|
||||||
<define name="EZCURRENT_I2C_DEV" value="i2c1" description="change default i2c peripheral to i2c1"/>
|
<configure name="EZCURRENT_I2C_DEV" value="i2c1" description="change default i2c peripheral to i2c1"/>
|
||||||
</doc>
|
</doc>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
@@ -14,6 +14,13 @@
|
|||||||
<event fun="ezcurrent_read_event()"/>
|
<event fun="ezcurrent_read_event()"/>
|
||||||
|
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
EZCURRENT_I2C_DEV ?= i2c0
|
||||||
|
EZCURRENT_I2C_DEV_LOWER=$(shell echo $(EZCURRENT_I2C_DEV) | tr A-Z a-z)
|
||||||
|
EZCURRENT_I2C_DEV_UPPER=$(shell echo $(EZCURRENT_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(EZCURRENT_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="EZCURRENT_I2C_DEV" value="$(EZCURRENT_I2C_DEV_LOWER)"/>
|
||||||
<file name="ezcurrent.c"/>
|
<file name="ezcurrent.c"/>
|
||||||
<!-- This disables the standard electrical monitoring system -->
|
<!-- This disables the standard electrical monitoring system -->
|
||||||
<define name="DISABLE_ELECTRICAL" description="Disable default electrical handling"/>
|
<define name="DISABLE_ELECTRICAL" description="Disable default electrical handling"/>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
Generic com.
|
Generic com.
|
||||||
Can be used for Satcom/GSM
|
Can be used for Satcom/GSM
|
||||||
</description>
|
</description>
|
||||||
<define name="GENERIC_COM_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
<configure name="GENERIC_COM_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
||||||
<define name="GENERIC_COM_SLAVE_ADDR" value="i2c address"/>
|
<define name="GENERIC_COM_SLAVE_ADDR" value="i2c address"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
@@ -16,6 +16,13 @@
|
|||||||
<periodic fun="generic_com_periodic()" period="180" start="start_com()" stop="stop_com()" autorun="TRUE"/>
|
<periodic fun="generic_com_periodic()" period="180" start="start_com()" stop="stop_com()" autorun="TRUE"/>
|
||||||
<event fun="generic_com_event()"/>
|
<event fun="generic_com_event()"/>
|
||||||
<makefile>
|
<makefile>
|
||||||
|
<raw>
|
||||||
|
GENERIC_COM_I2C_DEV ?= i2c0
|
||||||
|
GENERIC_COM_I2C_DEV_LOWER=$(shell echo $(GENERIC_COM_I2C_DEV) | tr A-Z a-z)
|
||||||
|
GENERIC_COM_I2C_DEV_UPPER=$(shell echo $(GENERIC_COM_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(GENERIC_COM_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="GENERIC_COM_I2C_DEV" value="$(GENERIC_COM_I2C_DEV_LOWER)"/>
|
||||||
<file name="generic_com.c"/>
|
<file name="generic_com.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<module name="humid_htm_b71" dir="meteo">
|
<module name="humid_htm_b71" dir="meteo">
|
||||||
<doc>
|
<doc>
|
||||||
<description>TronSens HTM-B71 humidity sensor (I2C)</description>
|
<description>TronSens HTM-B71 humidity sensor (I2C)</description>
|
||||||
<define name="HTM_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
<configure name="HTM_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
<file name="humid_htm_b71.h"/>
|
<file name="humid_htm_b71.h"/>
|
||||||
@@ -13,6 +13,13 @@
|
|||||||
<periodic fun="humid_htm_read()" freq="4" delay="14"/>
|
<periodic fun="humid_htm_read()" freq="4" delay="14"/>
|
||||||
<event fun="humid_htm_event()"/>
|
<event fun="humid_htm_event()"/>
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
HTM_I2C_DEV ?= i2c0
|
||||||
|
HTM_I2C_DEV_LOWER=$(shell echo $(HTM_I2C_DEV) | tr A-Z a-z)
|
||||||
|
HTM_I2C_DEV_UPPER=$(shell echo $(HTM_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(HTM_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="HTM_I2C_DEV" value="$(HTM_I2C_DEV_LOWER)"/>
|
||||||
<file name="humid_htm_b71.c"/>
|
<file name="humid_htm_b71.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|||||||
@@ -17,12 +17,17 @@
|
|||||||
<periodic fun="imu_mpu9250_report()" freq="10" autorun="TRUE"/>
|
<periodic fun="imu_mpu9250_report()" freq="10" autorun="TRUE"/>
|
||||||
<event fun="imu_mpu9250_event()"/>
|
<event fun="imu_mpu9250_event()"/>
|
||||||
<makefile>
|
<makefile>
|
||||||
|
<raw>
|
||||||
|
IMU_MPU9250_I2C_DEV ?= i2c1
|
||||||
|
IMU_MPU9250_I2C_DEV_LOWER=$(shell echo $(IMU_MPU9250_I2C_DEV) | tr A-Z a-z)
|
||||||
|
IMU_MPU9250_I2C_DEV_UPPER=$(shell echo $(IMU_MPU9250_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(IMU_MPU9250_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="IMU_MPU9250_I2C_DEV" value="$(IMU_MPU9250_I2C_DEV_LOWER)"/>
|
||||||
<file name="imu_mpu9250.c"/>
|
<file name="imu_mpu9250.c"/>
|
||||||
<file name="mpu9250.c" dir="peripherals"/>
|
<file name="mpu9250.c" dir="peripherals"/>
|
||||||
<file name="mpu9250_i2c.c" dir="peripherals"/>
|
<file name="mpu9250_i2c.c" dir="peripherals"/>
|
||||||
<file name="ak8963.c" dir="peripherals"/>
|
<file name="ak8963.c" dir="peripherals"/>
|
||||||
<define name="USE_I2C"/>
|
|
||||||
<define name="IMU_MPU9250_I2C_DEV" value="$(IMU_MPU9250_I2C_DEV)"/>
|
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<module name="sensors">
|
<module name="sensors">
|
||||||
<doc>
|
<doc>
|
||||||
<description>hmc5843 magnetometer</description>
|
<description>hmc5843 magnetometer</description>
|
||||||
|
<configure name="HMC5843_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
<file name="mag_hmc5843.h"/>
|
<file name="mag_hmc5843.h"/>
|
||||||
@@ -11,11 +12,15 @@
|
|||||||
<periodic fun="hmc5843_module_periodic()" freq="60"/>
|
<periodic fun="hmc5843_module_periodic()" freq="60"/>
|
||||||
<event fun="hmc5843_module_event()"/>
|
<event fun="hmc5843_module_event()"/>
|
||||||
<makefile>
|
<makefile>
|
||||||
<define name="USE_I2C"/>
|
<raw>
|
||||||
|
HMC5843_I2C_DEV ?= i2c0
|
||||||
|
HMC5843_I2C_DEV_LOWER=$(shell echo $(HMC5843_I2C_DEV) | tr A-Z a-z)
|
||||||
|
HMC5843_I2C_DEV_UPPER=$(shell echo $(HMC5843_I2C_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(HMC5843_I2C_DEV_UPPER)"/>
|
||||||
|
<define name="HMC5843_I2C_DEV" value="$(HMC5843_I2C_DEV_LOWER)"/>
|
||||||
<file name="mag_hmc5843.c"/>
|
<file name="mag_hmc5843.c"/>
|
||||||
<file name="hmc5843.c" dir="peripherals"/>
|
<file name="hmc5843.c" dir="peripherals"/>
|
||||||
<define name="HMC5843_I2C_DEV" value="i2c0"/>
|
|
||||||
<define name="USE_I2C0"/>
|
|
||||||
<define name="HMC5843_NO_IRQ"/>
|
<define name="HMC5843_NO_IRQ"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
$(error mag_hmc58xx module error: please configure MAG_HMC58XX_I2C_DEV)
|
$(error mag_hmc58xx module error: please configure MAG_HMC58XX_I2C_DEV)
|
||||||
endif
|
endif
|
||||||
MAG_HMC58XX_I2C_DEV_UPPER=$(shell echo $(MAG_HMC58XX_I2C_DEV) | tr a-z A-Z)
|
MAG_HMC58XX_I2C_DEV_UPPER=$(shell echo $(MAG_HMC58XX_I2C_DEV) | tr a-z A-Z)
|
||||||
|
MAG_HMC58XX_I2C_DEV_LOWER=$(shell echo $(MAG_HMC58XX_I2C_DEV) | tr A-Z a-z)
|
||||||
</raw>
|
</raw>
|
||||||
<define name="USE_I2C"/>
|
|
||||||
<define name="USE_$(MAG_HMC58XX_I2C_DEV_UPPER)"/>
|
<define name="USE_$(MAG_HMC58XX_I2C_DEV_UPPER)"/>
|
||||||
<define name="MAG_HMC58XX_I2C_DEV" value="$(MAG_HMC58XX_I2C_DEV)"/>
|
<define name="MAG_HMC58XX_I2C_DEV" value="$(MAG_HMC58XX_I2C_DEV_LOWER)"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
<!DOCTYPE module SYSTEM "module.dtd">
|
<!DOCTYPE module SYSTEM "module.dtd">
|
||||||
|
|
||||||
<!--
|
|
||||||
Hygrosens TEMOD-I2C-Rx temperature sensor
|
|
||||||
@define SCP_I2C_DEV i2c device (default i2c0)
|
|
||||||
@define TEMOD_TYPE device type (default TEMOD_I2C_R1)
|
|
||||||
-->
|
|
||||||
|
|
||||||
<module name="temp_temod" dir="meteo">
|
<module name="temp_temod" dir="meteo">
|
||||||
<doc>
|
<doc>
|
||||||
<description>Hygrosens TEMOD-I2C-Rx temperature sensor</description>
|
<description>Hygrosens TEMOD-I2C-Rx temperature sensor</description>
|
||||||
<define name="SCP_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
<configure name="TEMOD_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
|
||||||
<define name="TEMOD_TYPE" value="type" description="device type (default TEMOD_I2C_R1)"/>
|
<define name="TEMOD_TYPE" value="type" description="device type (default TEMOD_I2C_R1)"/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
@@ -19,6 +13,13 @@
|
|||||||
<periodic fun="temod_periodic()" freq="8"/>
|
<periodic fun="temod_periodic()" freq="8"/>
|
||||||
<event fun="temod_event()"/>
|
<event fun="temod_event()"/>
|
||||||
<makefile target="ap">
|
<makefile target="ap">
|
||||||
|
<raw>
|
||||||
|
TEMOD_DEV ?= i2c0
|
||||||
|
TEMOD_DEV_LOWER=$(shell echo $(TEMOD_DEV) | tr A-Z a-z)
|
||||||
|
TEMOD_DEV_UPPER=$(shell echo $(TEMOD_DEV) | tr a-z A-Z)
|
||||||
|
</raw>
|
||||||
|
<define name="USE_$(TEMOD_DEV_UPPER)"/>
|
||||||
|
<define name="TEMOD_DEV" value="$(TEMOD_DEV_LOWER)"/>
|
||||||
<file name="temp_temod.c"/>
|
<file name="temp_temod.c"/>
|
||||||
</makefile>
|
</makefile>
|
||||||
</module>
|
</module>
|
||||||
|
|||||||
@@ -3,13 +3,6 @@
|
|||||||
|
|
||||||
#include "std.h"
|
#include "std.h"
|
||||||
|
|
||||||
#ifdef ENOSE
|
|
||||||
#if !defined USE_I2C && !defined SITL
|
|
||||||
#define USE_I2C
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define ENOSE_NB_SENSOR 3
|
#define ENOSE_NB_SENSOR 3
|
||||||
|
|
||||||
extern uint8_t enose_heat[ENOSE_NB_SENSOR];
|
extern uint8_t enose_heat[ENOSE_NB_SENSOR];
|
||||||
|
|||||||
Reference in New Issue
Block a user