2014-04-27 21:17:54 +01:00
|
|
|
add_executable (i2c_HMC5883L i2c_HMC5883L.c)
|
2014-06-24 17:24:54 +01:00
|
|
|
add_executable (hellomraa hellomraa.c)
|
2014-04-27 21:17:54 +01:00
|
|
|
add_executable (cycle-pwm3 cycle-pwm3.c)
|
2014-05-13 15:35:27 +01:00
|
|
|
add_executable (blink-io blink-io.c)
|
2014-05-01 16:36:11 +01:00
|
|
|
add_executable (analogin_a0 analogin_a0.c)
|
2014-05-07 14:48:21 +01:00
|
|
|
add_executable (isr_pin6 isr_pin6.c)
|
2014-05-13 15:35:27 +01:00
|
|
|
add_executable (gpio_read6 gpio_read6.c)
|
2014-05-16 11:51:21 +01:00
|
|
|
add_executable (spi_mcp4261 spi_mcp4261.c)
|
2014-05-29 16:30:07 +01:00
|
|
|
add_executable (mmap-io2 mmap-io2.c)
|
2014-06-20 18:00:19 +01:00
|
|
|
add_executable (blink_onboard blink_onboard.c)
|
2015-07-19 12:39:45 +01:00
|
|
|
add_executable (uart uart.c)
|
uart_ow: Initial support for Dallas 1-wire over UART support for MRAA
This commit introduces support for Dallas Semiconductor (DS) 1-wire
compliant device support using an available UART device.
The principle of operation is described in the following Application
note by Maxim Electronics:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/214
with help (1-wire search) from:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/187
It has been tested on Galileo 2 and Edison, with 2 DS 1-wire devices,
the DS18B20 and DS2413 connected to the bus. A UPM driver for the
DS2413 is already complete and a PR will be submitted after this one.
It is important that you use a UART with CMOS/TTL level voltages
(3.3v/5v) RX and TX lines. DO NOT use standard RS232 level voltages
or you are going to have a bad day.
In order for this to work, a simple interface circuit, using a single
diode must be constructed:
(forgive my "Asciihematic" :)
-|
U|
A| TX---|<--+
R| |
T| RX-------o--------o 1-wire data bus
-|
The diode on TX is a 1N4148 (cheap and common), with the cathode
connected to TX, and the anode connected to RX and the 1-wire data
line.
The 1-wire data line requires a pull-up resistor, as the DS 1-wire
spec requires. 4.7-5K is typical for DS 1-wire buses.
NOTE: DHT-type (temp/humidity sensor) 1-wire devices ARE NOT DS 1-wire
compliant, and will not work with this code/circuit unfortunately.
Also note, this will use up one of your UARTs, which cannot be used
for any other purpose (ie: to access true UART-type serial devices).
You can however, connect as many DS 1-wire devices as feasible to this
UART, as it will function as a DS 1-wire bus master.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-15 17:11:14 -07:00
|
|
|
add_executable (uart_ow uart_ow.c)
|
2015-03-31 13:54:10 +01:00
|
|
|
add_executable (mraa-gpio mraa-gpio.c)
|
2015-05-29 17:21:47 -07:00
|
|
|
add_executable (mraa-i2c mraa-i2c.c)
|
2015-02-14 18:51:56 +01:00
|
|
|
add_executable (spi_max7219 spi_max7219.c)
|
2015-09-28 16:53:58 +01:00
|
|
|
add_executable (iio_driver iio_driver.c)
|
2014-04-08 18:43:26 +01:00
|
|
|
|
2014-05-15 22:47:38 +01:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/api)
|
2015-06-26 13:48:23 -07:00
|
|
|
# FIXME Hack to access mraa internal types used by mraa-i2c
|
2015-05-29 17:21:47 -07:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/include)
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/api/mraa)
|
2014-04-10 11:04:02 +01:00
|
|
|
|
2014-06-24 17:24:54 +01:00
|
|
|
target_link_libraries (hellomraa mraa)
|
|
|
|
|
target_link_libraries (i2c_HMC5883L mraa m)
|
|
|
|
|
target_link_libraries (cycle-pwm3 mraa)
|
|
|
|
|
target_link_libraries (blink-io mraa)
|
|
|
|
|
target_link_libraries (analogin_a0 mraa)
|
|
|
|
|
target_link_libraries (isr_pin6 mraa)
|
|
|
|
|
target_link_libraries (gpio_read6 mraa)
|
|
|
|
|
target_link_libraries (spi_mcp4261 mraa)
|
|
|
|
|
target_link_libraries (mmap-io2 mraa)
|
|
|
|
|
target_link_libraries (blink_onboard mraa)
|
2015-07-19 12:39:45 +01:00
|
|
|
target_link_libraries (uart mraa)
|
uart_ow: Initial support for Dallas 1-wire over UART support for MRAA
This commit introduces support for Dallas Semiconductor (DS) 1-wire
compliant device support using an available UART device.
The principle of operation is described in the following Application
note by Maxim Electronics:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/214
with help (1-wire search) from:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/187
It has been tested on Galileo 2 and Edison, with 2 DS 1-wire devices,
the DS18B20 and DS2413 connected to the bus. A UPM driver for the
DS2413 is already complete and a PR will be submitted after this one.
It is important that you use a UART with CMOS/TTL level voltages
(3.3v/5v) RX and TX lines. DO NOT use standard RS232 level voltages
or you are going to have a bad day.
In order for this to work, a simple interface circuit, using a single
diode must be constructed:
(forgive my "Asciihematic" :)
-|
U|
A| TX---|<--+
R| |
T| RX-------o--------o 1-wire data bus
-|
The diode on TX is a 1N4148 (cheap and common), with the cathode
connected to TX, and the anode connected to RX and the 1-wire data
line.
The 1-wire data line requires a pull-up resistor, as the DS 1-wire
spec requires. 4.7-5K is typical for DS 1-wire buses.
NOTE: DHT-type (temp/humidity sensor) 1-wire devices ARE NOT DS 1-wire
compliant, and will not work with this code/circuit unfortunately.
Also note, this will use up one of your UARTs, which cannot be used
for any other purpose (ie: to access true UART-type serial devices).
You can however, connect as many DS 1-wire devices as feasible to this
UART, as it will function as a DS 1-wire bus master.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-15 17:11:14 -07:00
|
|
|
target_link_libraries (uart_ow mraa)
|
2015-03-31 13:54:10 +01:00
|
|
|
target_link_libraries (mraa-gpio mraa)
|
2015-05-29 17:21:47 -07:00
|
|
|
target_link_libraries (mraa-i2c mraa)
|
2015-02-14 18:51:56 +01:00
|
|
|
target_link_libraries (spi_max7219 mraa)
|
2015-09-28 16:53:58 +01:00
|
|
|
target_link_libraries (iio_driver mraa)
|
2016-03-08 22:18:32 +00:00
|
|
|
|
|
|
|
|
if (FIRMATA)
|
|
|
|
|
add_executable (firmata_curie_imu firmata_curie_imu.c)
|
|
|
|
|
add_executable (i2c_firmata i2c_firmata.c)
|
|
|
|
|
target_link_libraries (firmata_curie_imu mraa)
|
|
|
|
|
target_link_libraries (i2c_firmata mraa)
|
|
|
|
|
endif ()
|
2014-05-15 22:47:38 +01:00
|
|
|
|
|
|
|
|
add_subdirectory (c++)
|
2014-05-22 14:23:47 +01:00
|
|
|
|
2015-11-11 13:43:46 -08:00
|
|
|
install (DIRECTORY ${PROJECT_SOURCE_DIR}/examples/ DESTINATION ${CMAKE_INSTALL_DATADIR}/mraa/examples)
|
2015-03-31 13:54:10 +01:00
|
|
|
|
2016-01-28 16:11:16 -08:00
|
|
|
if (INSTALLGPIOTOOL AND NOT INSTALLTOOLS)
|
2015-03-31 13:54:10 +01:00
|
|
|
install (TARGETS mraa-gpio DESTINATION bin)
|
|
|
|
|
endif()
|
2016-01-28 16:11:16 -08:00
|
|
|
|
|
|
|
|
if (INSTALLTOOLS)
|
|
|
|
|
install (TARGETS mraa-gpio DESTINATION bin)
|
|
|
|
|
install (TARGETS mraa-i2c DESTINATION bin)
|
|
|
|
|
endif()
|