Commit graph

525 commits

Author SHA1 Message Date
Maciek Borzecki 291415a6c4 samples/drivers/disco: add 'disco' sample program
Add a sample program for blinking with GPIO connected LEDs. The sample
program by assumes the use of Nucleo-64 F103RB development board as the
target and will need to be updated for other platforms. The intention is
that the code will serve as an example of how to use GPIOs in one's
code.

Change-Id: Ia190a7ad5b07181731c9f502d87bd0ef0ba1abde
Origin: Original
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-18 20:49:32 +00:00
Anas Nashif cee0eb5816 watchdog: use instance name instead of variable
Do not depend on CONFIG_WDT_DW_DRV_NAME

Change-Id: Ib16389b2c64fdaa154f451a5c38bd4a25a0dfba5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-18 14:12:42 +00:00
Baohong Liu 61064f0c5e samples: A test app for quark Always-on counter and timer
Test application to test quark Always-on counter and timer.

This app requires QMSI lib which is not in the repo yet.
See the instruction in readme.txt.

Origin: Original

Change-Id: If75b2714f9b609abc6f7b51c1c0d99d15152399f
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-03-17 08:59:04 -04:00
Andre Guedes 7c956d2ece drivers: Replace DEV_FAIL by -EIO
This patch replaces all occurences of the macro DEV_FAIL by -EIO
at the driver level. So this patch touch the files under drivers/,
include/ and samples/drivers/ when applicable.

This patch is part of the effort to transition from DEV_* codes to
errno.h codes.

Change-Id: I0594ab5dbe667e074c250129e7c13ce512ac940f
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-16 19:30:04 -04:00
Andre Guedes 024cfe754e drivers: Replace DEV_OK by 0
This patch replaces all occurences of the macro DEV_OK by the actual
value 0 at the driver level. So this patch touch the files under
drivers/, include/ and samples/drivers/.

This patch is part of the effort to transition from DEV_* codes to
errno.h codes.

Change-Id: I69980ecb9755f2fb026de5668ae9c21a4ae62d1e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-16 19:30:04 -04:00
Andre Guedes 9a8c79f08a samples: Add STTS751 sample application
This patch introduces the i2c_stts751 sample application which
illustrates how to use the I2C APIs from Zephyr. The slave device
is the STTS751 sensor which is present in Quark SE devboard. So
no wiring instructions are required in order to get this sample
working.

The application reads the temperature register from STTS751 sensor
and prints the temperature value. This sample is specific to Quark
SE Devboard, but it can be easily extended to support any other
board with the STTS751 sensor.

Change-Id: I9b56aa73645d4741942fc793f1450c6a1c7beb29
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-16 19:35:19 +00:00
Andre Guedes eeec6088aa samples: uart: Test irq-based APIs
This patch extends the uart sample so the same functionality (write
buffer, read char then write buffer again) is implemented using
irq-based APIs.

Change-Id: Iefb14dae2b253f90da64ccef8c123619ed494aca
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-08 14:21:40 +00:00
Daniel Leung 10e64e4457 samples: an app to use the APDS9960 RGB and Gesture sensor
This adds an app to get the RGBC values from the APDS9960 sensor,
and drives one APA102C with those values. The app works on the ARC
side of Arduino 101.

Change-Id: Iaee7bd11c06b03cf3c69f8ccb84cdb649634bb6c
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-05 13:36:59 +00:00
Andre Guedes 59912cf13f samples: Add UART application
This patch adds a very simple UART sample application which demonstrates
how to use the UART APIs. This sample is also useful to quickly verify
if a given UART driver is working properly. For now, the application
tests uart_poll_in() and uart_poll_out() APIs only, but new APIs should
be added in future.

Change-Id: If815f358f11efb058e947291b234d3d4130581d8
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-04 15:16:20 +00:00
Anas Nashif 21594aa1fd Revert "samples: A test app for WinBond spi flash"
This reverts commit 1b1a9ef845.

This sample was merged by mistake and without the needed drivers
or APIs.

Change-Id: Icf588ed3517e9c2f905d319e6f6f5fff935aa77a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-04 00:59:36 +00:00
Vinicius Costa Gomes aab47a4e15 samples: w25q80bl: Add a README file
It should be made clear that this example is specific to the Quark SE
development board.

Change-Id: Ia3e0ec728891eb586bf1461ae9103ce34fd5e24f
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-27 09:55:06 +00:00
Vinicius Costa Gomes 80a3c8d4c3 samples: w25q80bl: Fix wrong check for GPIO pin as CS
The check was wrong and was checking twice for the QMSI version.

Change-Id: I7a73cc6523f141cae0e69b1a51791f6be87cb6de
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2016-02-27 09:55:06 +00:00
Andre Guedes 4c9954d30b samples: Add wiring info for Quark D2000 CRB
This patch adds the wiring information to spi_lsm9ds0 README so this
sample app can also be used in Quark D2000 CRB.

It also fixes the SDA pin from Quark SE Devboard since it was wrong.

Change-Id: I24d4df15186ef111f728a21f137246cf933a8222
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 14:57:45 +00:00
Andre Guedes dffe5f726f samples: watchdog: Remove driver selection
This patches removes 'CONFIG_WDT_DW=y' so we rely on the platform's
default option for the watchdog driver. This way the watchdog sample
application can be built for different platforms without changing
the configuration file.

Change-Id: I4fa0f8e1f34a4608d602b6a5120fa1818b94aa6a
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 14:22:06 +00:00
Andre Guedes 3d0c115a27 samples: gpio: Remove driver selection
This patches removes 'CONFIG_GPIO_DW=y' and 'CONFIG_GPIO_DW_0=y' so
we rely on the platform's default options for the gpio driver. This
way the gpio sample application can be built for different platforms
without changing the configuration file.

Change-Id: I2480fee5fcd5463c39470c668c4438d83ecb786f
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 14:17:55 +00:00
Andre Guedes ccab7d0d6f samples: rtc: Decrease alarm timeout value
The current value for RTC alarm has been a bit annoying during RTC tests
since we have to wait 10 seconds to verify that the RTC driver is working
properly. So this patch changes the alarm timeout to 1 second.

Change-Id: I2ef2aaeb13a4f53c8ab294ffedc198e8f3ba92a7
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 14:13:33 +00:00
Andre Guedes e080b38f85 samples: gpio: Add support for Quark D2000
This patch extends the gpio sample application so it can be used to test
GPIO functionality in Quark D2000 CRB.

Change-Id: I69fed701708a7268e1e5386a9dfde68fe6bb8160
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 13:06:28 +00:00
Andre Guedes f5a360e1fb samples: rtc: Remove driver selection
This patches removes 'CONFIG_RTC_DW=y' so we rely on the platform's
default option for the RTC driver. This way the RTC sample application
can be built for different platforms without changing the configuration
file.

Change-Id: I88fc7cc2f072406c9d774a9b4682439df94f3bbc
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 12:32:17 +00:00
Andre Guedes ec7c6a80fc i2c: Enable QMSI driver for Quark D2000
This patch fixes the QMSI I2C shim driver so we are able to use it in
Quark D2000 based platforms. The only change required to enable this
driver is an #if guard in i2c_qmsi_init() because the macro QM_I2C_1
is not defined in QMSI headers from Quark D2000.

Since this drivers is now properly tested with Quark D2000, this patch
sets the QMSI driver default options in arch/x86/soc/quark_d2000/Kconfig.
It also adds the wiring information required to test the i2c_lsm9ds0
sample app in the Quark D2000 CRB.

Change-Id: I4be03c09304da5a66ac663e48b1d72225eb5651d
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 02:51:49 +00:00
Andre Guedes 0c5b7f7d22 samples: Add i2c_lsm9ds0 application
This patch adds a new sample application to demonstrate how to use
I2C APIs. The application is very simple. It simply reads the 'WHO
AM I' register from the accelerometer in the LSM9DS0 chip and check
if it matches with the value described in the datasheet.

It also adds a README file which provides the wiring information
required to get the sample application working on Quark SE DevBoard.

Change-Id: I9162c030874c2718506b76519b255c9c11631802
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-02-20 02:51:18 +00:00
Baohong Liu 1b1a9ef845 samples: A test app for WinBond spi flash
Add a test app for WinBond spi flash.

Change-Id: I2c274d1c2842bbe029a41fdfbc7ab8f59949eec2
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-02-19 17:13:20 +00:00
Anas Nashif 1e57226ae6 boards: remove obsolete CTB board
This board is not supported and not available for general public.
Use the Quark SE CRB/Devboard instead.

Change-Id: Id0f8c08bbacb812ef00fe9502b4acecf4f31ffd7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 17:07:08 +00:00
Dan Kalowsky 10a442824a samples : incorrectly addressing SPI port
Correcting the discovery method for SPI port.  The current method is based
 upon knowledge of a specific port and a *_DRV_NAME value.  Instead this
 should be based upon the use of the device_get_binding() for SPI_0.

Change-Id: I250f5dddf2a2e79c4714addf647b0c74bd79ec5a
Signed-off-by: Dan Kalowsky <daniel.kalowsky@intel.com>
2016-02-12 01:43:39 +00:00
Anas Nashif d2a31e9f10 tests: remove redundant build tests
i2c_quark_se_ss and dw_aio_comparator are just build tests that
enable Kconfig options and do not do anything. We have real samples
for those drivers now.

Change-Id: Ia8c0a1801b967205cc1c116a0887b46a7dc5bbbe
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 65f538238b move driver samples to samples/drivers
All SoC specific driver tests go to samples/drivers.

Change-Id: Ia9aa2140465320a548504ddb7a44569e2d2af6bd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00