Commit graph

525 commits

Author SHA1 Message Date
Tomasz Bursztyka 308f4df91d samples/drivers: Switch Fujistu FRAM sample to new SPI API
Replacing legacy API calls by news ones.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Tomasz Bursztyka 324265420b api/spi: Disable legacy API by default
Let's start deprecation work of the SPI legacy API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-04-04 19:02:35 +02:00
Carles Cufi 8aa9a37902 drivers: flash: nrf: Rename nrf5 to nrf
With upcoming ICs that are not in the nRF5x family, rename the flash
driver and all its dependencies from nrf5 to nrf.

Should also fix the issue introduced by f49150cab6 which broke the
assignment of the flash device due to a partial rename.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-20 20:07:09 +01:00
Johan Hedberg dd9f5e2a1d samples: led_strip: Extend ws2812 sample with ws2812b_sw support
Add support for building the WS2812 LED strip driver sample against
the new ws2812b_sw driver. Currently a configuration is only provided
for the BBC micro:bit board.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-03-03 20:46:53 +01:00
Alberto Escolar Piedras d118b6470e samples: drivers/entropy fixes
* .yaml: added expression for test
* README: Eeach second 9 bytes are generated not 10

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-02-23 07:34:07 -05:00
Leandro Pereira 2a98e7cfb4 samples: drivers: crypto: Print correct buffer comparison on failure
When testing whether the CTR mode decrypted the payload properly, a
comparison of `decrypt.out_buf` with the known plain text `plaintext`
is performed, but the buffer comparison that is printed uses
`plaintext` and `encrypt.out_buf` instead.

Coverity-CID: 181847

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-02-17 09:15:10 -05:00
Erwan Gouriou c734c2972f flash: remove obsolete FLASH_DRIVER_NAME
Replace seldom occurrences of FLASH_DRIVER_NAME by equivalent
and commonly used FLASH_DEV_NAME.

Fixes #5919.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-02-06 11:48:53 -06:00
David B. Kinder ec1b1df5ed doc: fix ReST heading underlines
The expected order for heading levels in our ReST documents is # for H1,
* for H2, = for H3, and - for H4.  Some documents snuck in without
following this guideline.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-02-01 19:33:39 -08:00
Maureen Helm 928ff12c73 samples: drivers: Add freedom boards to flash_shell sample
Adds frdm_k64f, frdm_kw41z, and frdm_kl25z boards to the flash_shell
sample.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2018-01-31 16:43:40 -06:00
Kumar Gala 26e4da52cf arm: nordic: flash: Use FLASH_DEV_NAME define
We want to move to use a common FLASH_DEV_NAME across the various flash
drivers. So samples, tests, or other code can be a bit more generic.  So
replace CONFIG_SOC_FLASH_NRF5_DEV_NAME with FLASH_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Anas Nashif 1a67aed51f samples: crypto: remove DEBUG/ASSERT from prj.conf
Those are added by sanitycheck, no need to have them enabled in the
project by default.

CONFIG_DEBUG is causing issues on qemu_nios2, see #5743.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Anas Nashif 5d3a534807 samples: use console harness for some samples
The output of those samples can be parsed and verified by sanitycheck,
so lets use the console harness for this.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-25 04:45:35 +05:30
Andrzej Puzdrowski 9fdcab9b1b samples: drivers: soc_flash_nrf5 fix missing flash write access
By default CONFIG_MPU_ALLOW_FLASH_WRITE=n so the example must have been
falling on any write to flash.
This patch adds CONFIG_MPU_ALLOW_FLASH_WRITE=y to project configuration.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-19 11:47:43 -06:00
Yannis Damigos 3d1115adea tests: Clear SPI_*_IRQ_PRI from tests and samples
Remove SPI_*_IRQ_PRI from tests and samples.
Using DT to get the *_IRQ_PRI, we can't
override it using Kconfig.

If needed, use a BOARD_NAME.overlay file to
override default values.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-01-17 11:51:48 -06:00
Anas Nashif c3880c0db4 samples: crypto: increase min_ram for sample
This samples does not fit on platforms with 8k RAM, increase minimal
requirements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-13 10:48:36 -05:00
Anas Nashif c6d2ba996f samples: drivers: remove build_only flag
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 26ccc0bbcb samples: crypto: remove build_only and sample cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 0d841cf0f2 samples: entropy: filter based on HW capabilities
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 4599bbff67 samples: watchdog: fix dependencies and sample cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif d473d53da8 samples: rtc: fix dependencies and test cleanup
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 7440a7ff23 tests: move aio sample to tests
This is clearly a test and not a sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 23f81eeb42 tests/samples: fixed yaml syntax
Use a map directory, avoid the list which makes parsing a bit
cumbersome.

Fixes #5109

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Anas Nashif d55884a34d sample: crypto: also test mbedTLS config
expand testing to mbedTLS

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-11-16 05:48:16 -05:00
David B. Kinder be9ee06bd9 doc: fix misspellings in boards and samples docs
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-11-15 12:59:22 -05:00
Carles Cufi 19d1e9afd1 samples: drivers: Convert doc to CMake
Convert doc of samples/drivers to CMake.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-11-12 21:13:23 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Leandro Pereira da9b0ddf5b drivers: Rename random to entropy
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Marti Bolivar 306c717b9e samples: drivers: add WS2812 sample application
This is similar to the LPD8806 sample, but uses the WS2812 driver
instead. The app configuration is a bit more finicky, so try to
provide helpful references. This could be made more beginner-friendly
with the addition of timing diagrams, etc., but this should be enough
for an experienced developer to use.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-10-28 13:23:30 -04:00
Marti Bolivar 3e674eac98 samples: drivers: add LPD8806 sample application
This sample displays the colors red, green, and blue on consecutive
LEDs in an LED strip, moving the starting point where red begins
further down the strip at each time step. The color band wraps around
to the beginning when it reaches the end.

Since this is the first application in samples/drivers to have
documentation, add samples/drivers/drivers.rst as well, and include it
in the top-level toctree from samples/samples.rst.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-10-28 13:23:30 -04:00
Adam Podogrocki 61467e019e iwdg: the sample of the use of STM32 Independent Watchdog
JIRA: ZEP-2347

Change-Id: I808e9f110681735cae45d14c5802636012f018cc
Signed-off-by: Adam Podogrocki <adam.podogrocki@rndity.com>
2017-10-23 09:51:16 +02:00
David B. Kinder 4600c37ff1 doc: Fix misspellings in header/doxygen comments
Occasional scan for misspellings missed during PR reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-10-17 19:40:29 -04:00
Anas Nashif 0356590df5 tests: samples: fix yaml syntax
Fix indentation and syntax and make it pass yamllint tool.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-15 08:15:00 -04:00
Andrzej Puzdrowski a568e1399f sample: drivers: soc_flash_nrf5: Test of write-block-size get API
Added example code of using the new API for retrieving write-block-size.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-10-11 11:19:15 -05:00
Marti Bolivar 1047be9dbe samples: flash_shell: update to keep up with flash driver changes
Keep the flash shell up to date with the latest flash driver updates.

- Get the driver name from soc.h
- Add a write_block_size command
- Implement flash_shell_page_layout() using flash_page_foreach()

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-10-06 22:12:23 -04:00
Marti Bolivar 219b3cd067 samples: drivers: add flash_shell
This is a simple shell module that allows arbitrary boards with flash
driver support to explore the flash device.

- Reading, erasing, and writing by device offsets are supported in all
  cases.

- If the flash page layout is available, it can be printed, and I/O
  can also be done to a specified page as well.

One known issue is that writing to flash on targets that require
doubleword-sized writes (e.g STM32L4) will fail since the number of
arguments required exceeds ARGC_MAX in shell.c. Addressing that is
left to future work.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-09-11 11:41:57 -04:00
Andrzej Puzdrowski 4255766ba7 samples: drivers: soc_flash_nrf5: Get flash page layout sample
Added sample code for testing and displaying the flash layout using
the recently introduced API.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2017-09-11 11:41:57 -04:00
Tomasz Bursztyka 087354019f samples/crypto: Add mbedtls shim driver support
Normalizing variables names and make sure tag handling behavior, which
might be different among backends, does not make the test failing.

Also, improving debug logs in case of error.

Change-Id: Ic317948aab459bfa75c9a72ac48cb2d12a0d0706
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-08-17 22:20:23 -04:00
Tomasz Bursztyka 422a769cc2 samples/crypto: Check error code everytime and improve logging
If the encryption/decryption failed there is no need to procceed
further.

Change-Id: If450e40ed6fd601b698b74c56ae21fc7f903d087
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-08-17 22:20:23 -04:00
Leandro Pereira d89e7e4e45 samples: drivers: gpio: Make the sample work with ESP32
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-09 12:26:14 -07:00
Erwin Rol 3ff4d7409f samples: random: Add sentinel to check for buffer overflows
Initialize the buffer to 0 and read one byte less than the
buffer size. The result should be that the last byte of
the buffer always stays 0. This way it is possible to verify
it the driver does not write outside the buffer.

Signed-off-by: Erwin Rol <erwin@erwinrol.com>
2017-07-07 07:27:39 -05:00
Anas Nashif c364e06ccb tests: move spi test under tests/
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-05 12:43:13 -04:00
Neil Armstrong 395daba0d4 samples/spi: Enable test on STM32 SoCs
Add support for the STM32 SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Neil Armstrong 394aa8127a samples/spi: Permit specifying low test frequency
The STM32 lower frequency is different, let us specify a different one.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Neil Armstrong 9eb865e03a samples/spi: Make async test optional
Handle the case when the async transceive call returns ENOTSUP.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-07-01 08:36:51 -04:00
Anas Nashif 3c50f7aa12 tests: samples: remove duplicate filtering
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-27 17:44:23 -04:00
Anas Nashif 470c5f3189 tests: remove testcase.ini files
We now use yaml files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Anas Nashif cc24f4b03c tests: samples: convert testcase files to yaml
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Geoffrey Le Gourriérec 1975ce4f7c samples: gpio: Add support for SensorTag board.
Add extra #defines in samples/drivers/gpio to test
TI SensorTag board.

Signed-off-by: Geoffrey Le Gourriérec <geoffrey.legourrierec@smile.fr>
2017-06-16 16:18:12 -04:00
Tomasz Bursztyka cced7fd47a api/spi: Change transceive functions signature
Instead of NULL terminated buffer arrays, let's add a parameter for each
that tells the number of spi_buf in it.

It adds a little bit more complexity in driver's side (spi_context.h)
but not on user side (bufer one has to take care of providing the NULL
pointer at the end of the array, now he requires to give the count).

This will saves a significant amount of bytes in more complex setup than
the current dumb spi driver sample.

Fix and Use size_t everywhere (spi_context.h was using u32_t).

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-06-01 10:49:30 -04:00
Tomasz Bursztyka 0938ccbbc1 samples/spi: Add a quick test for spi_release() API function
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Tomasz Bursztyka d9007a09f8 samples/spi: Add an asynchronous call test
This gives a quicke example on how to use SPI asynchronous calls with
kernel's k_poll API.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Tomasz Bursztyka 761a1d9429 api: Add asynchronous call support to SPI API
Adding a struct k_poll_signal parameter to driver's API unique
exposed function.

If not NULL, the call will be handled as asynchronous and will
return right after the transaction has started, on the contrary
of current logic where is waits for the transaction to finish
(= synchronous).

In order to save stack, let's move the device pointer to struct
spi_config. So the call is still at a maximum of 4 parameters.

Adapting spi_dw.c and spi driver sample to the change so it still
builts.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Tomasz Bursztyka cd54dc66f2 samples: Add an SPI driver test application
This application intents to test an SPI driver by looping over MISO/MOSI
line where the controller will then send data to itself.

It will test various buffer tx/rx schemes.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-05-19 18:52:25 -04:00
Anas Nashif 51f9318a32 samples: lcd_hd44780: return if binding fails
Coverity-ID: 151980
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-18 11:19:11 -05:00
Justin Watson 558281b096 arch: sam3x: update Kconfig options after move to SAM SoC family tree
The files for the Arduino Due needed to be updated to use the new
configuration when the SoC moved from the atmel_sam3 directory to
the atmel_sam/sam3x directory.

Jira: ZEP-2067

Signed-off-by: Justin Watson <jwatson5@gmail.com>
2017-05-03 13:51:37 -04:00
Tomasz Bursztyka fcb4ea1383 samples/crypto: Use sys_log properly
Sys log already break a line after each line, by default, so removing
the '\n' on log messages.

Enabling support for sys log colors.

Change-Id: Ica3a601aba0bbbd2d9438b41fb7bca0aad9c05f4
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:35 +00:00
Tomasz Bursztyka 50151db3c5 samples/crypto: Fix memory leaks
Don't return without freeing the session when relevant.

Change-Id: I9e5903791f8eb54026c4bb2ddda9f1fe9f3f7bb3
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:35 +00:00
Tomasz Bursztyka 0b5946e4b7 drivers/crypto: Use a proper driver name for TinyCrypt shim driver
Change-Id: I526677c98fa70e46f92dbb4e4569707e1cb8469a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:29 +00:00
Kumar Gala e547533435 samples: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08c682bfc0b80dfa88de859e90a011bcd2db2762
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:53 -05:00
Kumar Gala 789081673f Introduce new sized integer typedefs
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t.  This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.

We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.

We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.

Jira: ZEP-2051

Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-20 16:07:08 +00:00
Anas Nashif 7c81d7f981 samples: remove lsm9ds0 sample code which does nothing
This sensor is supported already with many features, using it to test
SPI and I2C is an overkill. For both basic I2C and SPI samples we have
the FRAM samples supporting both IOs.

Change-Id: I794e584bd540d5fe6353fa3370aac0f1d6d105dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-20 10:31:07 +00:00
David B. Kinder 30450fea2a spell: fix doxygen comment typos: /boards /samples
Fix doxygen comment typos used to generate API docs

Change-Id: I248d53000d8e57b902b9a18fdcfc9e995142a8b3
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-19 18:38:19 +00:00
Anas Nashif d7bc60f096 kernel: remove remaining microkernel references
Change-Id: Ie648dbaaf714316c21395bd43e555618013dbd19
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-10 20:21:05 +00:00
Kuo-Lang Tseng 4a363ff5bf samples: i2c_fujitsu: change hard-coded device name
Change to use the device config name defined by driver's Kconfig
for device binding, instead of hard-coding it which is not
portable.

Jira: ZEP-1764

Change-Id: I61ed7cfd97e20faad8f1e98dacef9384e8fefc73
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-28 13:49:48 +00:00
Kuo-Lang Tseng e90aa43eaa samples: drivers: change hard-coded device name
Change to use the device name defined by driver's Kconfig for
device binding, instead of hard-coding it which is not portable.

Jira: ZEP-1764

Change-Id: I0dc9aa2cdf426af71f1ed6dcef1ec7cec19f4c3e
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-28 13:48:30 +00:00
Kuo-Lang Tseng 1980325392 samples: drivers: rtc: change hard-coded device nam
Change to use the device config name defined by driver's Kconfig
for device binding, instead of hard-coding it which is not
portable.

Jira: ZEP-1764

Change-Id: I7af234ada73302eb062340740df2fc7a8539150d
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-28 13:46:49 +00:00
Anas Nashif 87a422896c Revert "samples: i2c_lsm9ds0: change hard-coded device name"
This reverts commit 81f85f4e4b.

Need a better solution for this, the patch itself does not solve any problem
and fails on many platforms that do not have I2C enabled.

Change-Id: I060e3d7a9992db8a1ece6da5e8d3a521f4052395
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-24 06:30:39 -08:00
Andrew Boie 138579a3ad samples: add some missing testcase.ini
Issue: ZEP-1768
Change-Id: Ia59e02bdaf9302b991f0423ef5eba7b0102877b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-23 13:28:03 +00:00
Kuo-Lang Tseng e47e85e279 samples: driver: led_apa102c: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is safer because device name can change and
the app does not need to change.

Jira: ZEP-1764

Change-Id: I5a3e16e10f7700ec12edbd07603808cd32f15755
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:24:42 +00:00
Kuo-Lang Tseng 81f85f4e4b samples: i2c_lsm9ds0: change hard-coded device name
Instead of using a hard-coded device name in the device binding
call, use the config name defined by the driver Kconfig as that
is safer and the app does not need to change when the device name
is changed.

Jira: ZEP-1764

Change-Id: I99efc4bcae0d1acae70f7820f69dfffbe17510a6
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 13:24:04 +00:00
Anas Nashif fe118c4e95 license: replace APL2.0 license with SPDX
Some files made it through review process with full license header.

Change-Id: I2722b127c40b4b19500042c12e4fde85a165bae9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-20 16:59:46 +00:00
Jithu Joseph 38aaa7c955 samples/drivers/crypto: crypto sample app
A sample application  to illustrate the usage of crypto APIs.
This shows the usage of AES - CTR, CBC and CCM  based encryption
and decryption.

origin: original

Change-Id: I17e4d966a70169b71a754c9cdc3f713a5d0c3ac0
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-15 01:08:16 +00:00
Baohong Liu 42af60328d samples: spi_flash: remove an unnecessary config symbol
Remove CONFIG_GPIO from the prj config file. It is redundant.

Change-Id: Ife4301e7ce480a9002cadcddfd5eaa569900a391
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-04 19:45:44 +00:00
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
Anas Nashif b52a5450b0 legacy: use k_cycle_get_32 instead of legacy sys_cycle_get_32
Jira: ZEP-1585
Change-Id: Idac4685625f191771b90ce78234d97f5143413f0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-17 19:03:34 +00:00
Punit Vara 959988662f samples: basic: Move pwm driver samples
This patch moves pwm driver samples to samples/basic and also convert
documentation of PWM samples to RST.

Jira: ZEP-1536
Change-Id: Ib2b3ff8b1722a26618e9a6fe416e2138d82ca28b
Signed-off-by: Punit Vara <punitvara@gmail.com>
2017-01-11 15:15:31 +00:00
Anas Nashif eeb6a30f29 samples: apds9960: move under sensors and update docs
Change-Id: I8e5735f15dbba5b9fead8f677104843a947b28ca
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-11 12:24:58 +00:00
Marcus Shawcroft c66adc646d samples: Add random driver sample.
Change-Id: If0552cbd478e49c71bbfa02448113a3a0e3b4463
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-12-24 16:40:11 +00:00
Baohong Liu 34f735fe60 samples: i2c_fram: update some comments
Change-Id: Ie86f50828df8c5c3f975024c2e3bc4254714fa3c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-22 01:21:54 +00:00
Baohong Liu 3b831465a4 samples: spi_fram: correct syntax error and update comments
Correct some syntax error and update some comments. There is
no functionality change.

Change-Id: I86c922c8aabcc4464b86f33ad7edf6056b1d765c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-11 11:26:57 +00:00
Baohong Liu cdf41416bd samples: gpio: use correct gpio driver name
The gpio device driver name for the sensor sub-system was
renamed to GPIO_SS_x from GPIO_x recently. Let's use the
new gpio driver name for the sensor sub-system in the app.

Change-Id: Ie06b072d31e23e74c3ac41a4590845b24a020ed1
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-11 11:24:22 +00:00
Baohong Liu e0359b5b5c samples: aio: fix some coding style issues
Change-Id: I799b8543e50716fec1685d32810419c7c3d94bf2
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-10 12:24:30 +00:00
Baohong Liu fc7dec1e5a samples: spi_flash: remove redundant code lines from config file
Remove two configuration parameters related to gpio used as spi
chip slect from prj config file. since they are already in
arduino 101 board config.

Change-Id: Iebaab605d8a6394e27c70ebbf4bac37a24665522
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-12-10 02:18:01 +00:00
Erwan Gouriou 7e631bd07d samples: pwm: update PWM sample to support ST Nucleo boards
Change-Id: I483f70a6b55b42105e9a3366f8735903e23be294
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2016-12-06 10:31:46 -06:00
Vincenzo Frascino bd2717740a samples/drivers: Add Beetle to Watchdog test
This patch adds Beetle to the Watchdog test case.

Jira: ZEP-1300
Change-Id: I371ca2f89aaec8e07f45cfa04fc2618d009cf487
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2016-12-06 10:31:45 -06:00
Sergio Rodriguez b0c0548ad6 samples: drivers: current sensing : Exit from testcase if device not found
Exiting from the test case when the i2c device is not found, this
to avoid a null pointer dereference

This issue was reported by Coverity

Coverity-CID: 151982

Change-Id: Ib11224ef2a78170f6e4d20545f645b4f2ea4a181
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-29 03:45:39 +00:00
Sergio Rodriguez 710f9a22a8 samples: drivers: led_apa102c: Exit from testcase if device not found
Exiting from the test case when the gpio device is not found, this
to avoid a null pointer dereference.

This issue was reported by Coverity

Coverity-CID: 151980

Change-Id: I7aafbc993674c8874a16b5a9213108f5769114ec
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-28 17:49:31 -08:00
Juan Manuel Cruz ec27d03ed4 sensor: fixes program hangs in the apds9960 sample
If an i2c transaction fails the sample will hang the program into
an infinite circle.

This commit will remove the infinite circle and report back the
error code from the i2c transaction.

Change-Id: I38d350a805af6bec43f2fa8d4af6ce4e3cc27662
Coverity-CID: 151991
Coverity-CID: 151992
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-11-18 23:17:30 +00:00
Juan Manuel Cruz 2936f0e00e sensor: fixes dead code in the apds9960 sample
If the gpio or spi devices are not found there is no
need to keep the device busy in a loop for this particular
sample.

Since it is not possible to continue execution it is better
to simply end the application.

Change-Id: Ie25ea970a479db2a2f339ca2b37f88541a45ef97
Coverity-CID: 151973
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-11-18 23:17:29 +00:00
Sergio Rodriguez b03ddf491f samples: drivers: gpio: Exit from testcase if device not found
Exiting from the test case when the gpio device is not found, this
to avoid a null pointer dereference

This issue was reported by Coverity

Coverity-CID: 151980

Change-Id: I44f13131d44c7c093781e1f11f8481e7ef8175c9
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-18 00:05:31 +00:00
Sergio Rodriguez 41004171d3 samples: drivers: i2c fram : Exit from testcase if device not found
Exiting from the test case when the gpio device is not found, this
to avoid a null pointer dereference

This issue was reported by Coverity

Coverity-CID: 151982

Change-Id: Ifaed47b2b48359dacfdb3111ca2895d5912779e6
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-18 00:01:34 +00:00
Sergio Rodriguez 02902df44b samples: aio comparators: Use expected pointer type in printf
The data structure member being used  is character array,
dereferencig this array gives **char instead of the expected
*char type.

This issue was reported by Coverity

Coverity-CID: 152030
Coverity-CID: 152033

Change-Id: Ied67e4b2d47017e6ad5e40b9b6fca1b496c483ed
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-17 14:23:13 +00:00
Baohong Liu 933e34621b samples: spi_fram: add spi FRAM sample app
Add a sample app to demonstrate the usage of Fujitsu SPI
FRAM.

It uses SPI 1 on quark spi controller and gpio 20 as CS.

Change-Id: I30c83bdd8312ca0cab7a62e397c0cb4ade0821cb
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-09 20:33:04 +00:00
Anas Nashif d622b09bc0 samples: tests: remove obsolete KERNEL_TYPE and kernel variables
Remove those from Makefiles and testcase.ini, we now support unified kernel
only and sanitycheck script now knows how to deal with this.

Change-Id: I853ebcadfa7b56a4de5737d95f2ba096babb2e13
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04 15:47:25 -04:00
Sergio Rodriguez fdf77e56bc samples: aio_comparator: use unified kernel
Use unified kernel for AIO comparator sample app.

Change-Id: Id6a9016a9c00d7400395dfbc431d7438804ffe37
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-04 17:26:16 +00:00
Baohong Liu 611420ced4 samples: spi_lsm9ds0: use unified kernel
Use unified kernel for lsm9ds0 (spi) app.

Change-Id: Ibd559b6879984d3964ba9e3f3d49d88e85291d8c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-04 01:39:49 +00:00
Sergio Rodriguez a770264ef3 samples: sensor_apds9960: convert to and build with unified kernel
Change-Id: I73863da2e9539fbcde79b39561badcd24c0bda80
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 21:00:41 +00:00
Baohong Liu f960e0fa08 samples: w25q80bl: remove the sample app
Remove this sample app. The component is no longer on the
board (quark_se_c1000_devboard).

Change-Id: I342616781e6f343cfc66b89cbdf85de5844f6f4a
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 12:03:08 -07:00
Baohong Liu 3a8d3dd07d samples: lcd_hd44780: use unified kernel
Use unified kernel for lcd hd44780 app.

Some delays were rounded up to multiples of millisecond, since
k_sleep only takes multiples of millisecond. Based on the lcd
datasheet, this should not cause any problem.

updated some comments based on what the code is actually doing.

Change-Id: I533c822dbaea0246dcd62a76cc23ce0d8edd4630
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 01:46:11 +00:00
Sergio Rodriguez cce647bf54 samples: watchdog: use unified kernel
Use unified kernel for the watchdog sample app.

Change-Id: I6b53f066033a451c3aafe7f3a528c7f3461ae305
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 01:39:52 +00:00
Sergio Rodriguez 3b0ecfa283 samples: current sensing : Use unified kernel for the current sensing app.
Change-Id: I739374a8134963bdca99f6de419809033a8a983e
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 01:39:34 +00:00
Sergio Rodriguez 7a0504e303 samples: soc_flash_nrf5: use unified kernel for SOC flash
Change-Id: I6f7a66d69919fe8d44b91ae52cb6f0aae6a3c7ba
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-03 01:39:17 +00:00
Baohong Liu 4b270bb544 samples: led_apa102c: use unified kernel
Use unified kernel for the led app.

Change-Id: Iadfcf9970bfa6a13f61b3b1833de2cf1d4af4b0b
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-02 17:32:11 -07:00
Baohong Liu f70bf9366f samples: gpio: use unified kernel
Use unified kernel for gpio app.

Change-Id: I08a85212ef4a06ba702eb0e7654855a9bac559a4
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 00:25:51 +00:00
Baohong Liu f3d0887fb0 samples: i2c_lsm9ds0: use unified kernel
Use unified kernel for i2c device lsm9ds0.

Change-Id: I1d8626571785bfc856e162bf5e1524a6530fe8e5
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 00:25:33 +00:00
Baohong Liu 4af945ed76 samples: rtc: use unified kernel
Use unified kernel for rtc app.

Change-Id: Ifafe48eb9d955b2954de9341c372e1fbc5538cf1
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 00:25:15 +00:00
Baohong Liu 8a2fbd8c90 samples: spi_flash: use unified kernel
Use unified kernel for spi flash app.

Change-Id: I723841ffd49ec7e36ad8c1aa19b168ba879a122e
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-03 00:25:01 +00:00
Sergio Rodriguez df605abea4 samples: i2c Fujitsu fram: use unified kernel for fram app
Use unified kernel for i2c Fujitsu FRAM breakout sample app.

Change-Id: I7c6f532850c7944bf1b7470e75fe19bc323b9fbc
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2016-11-02 23:20:15 +00:00
Baohong Liu 6dd7080ffb samples: pwm: use unified kernel for servo control app
Use unified kernel for pwm servo control app.

Change-Id: I08106f774f6c7fa2a4cd1fb909529f84905b5ea2
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-02 23:20:00 +00:00
Baohong Liu dd273ffe7d samples: pwm: use unified kernel for RGB led app
Use unified kernel for pwm RGB led app.

Change-Id: I1b6d62d420371a34a5bada5769bcbea1bc1a9a6a
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-02 22:14:47 +00:00
Baohong Liu c5a5397804 samples: pwm: use unified kernel
Use unified kernel.

Change-Id: Ifd7f6d9779759bd78fef734519fd48f0d0c5fc4a
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-02 20:54:05 +00:00
Baohong Liu 94bf561cf1 samples: pwm: use unified kernel
Use unified kernel.

Change-Id: I9602ccde67a3f77addedd8ce9470795d9502c020
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-11-02 20:53:34 +00:00
Baohong Liu 9824608935 samples: pwm: use new API and add rgb led app
Add a new pwm app (rgb led) using the new API.

Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.

To demonstrate the usage of the new PWM APIs, this app
to drive a rgb led is added. It will use the new API
pwm_pin_set_usec().

This app will be located in a new sub directory.

Jira: ZEP-745 ZEP-1029

Origin: Original

Change-Id: If8e5d8ab22dcf8b7cf3665e38949715c61ca9c03
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-10-31 20:02:23 +00:00
Baohong Liu 22a10c3b6c samples: pwm: use new API and add motor control app
Add a new pwm app (motor control) using the new API.

Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.

To demonstrate the usage of the new PWM APIs, this app
to drive a servo motor is added. It will use the new
API pwm_pin_set_usec().

This app will be located in a new sub directory.

Jira: ZEP-745 ZEP-1029

Origin: Original

Change-Id: I65857848e64d0478c4e12d1317b2089cdd1ecf5c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-10-31 20:02:06 +00:00
Baohong Liu 0273ddff24 samples: pwm: use new API and add fade led app
Add a new pwm app (fade led) using the new API.

Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.

To demonstrate the usage of the new PWM APIs, this app
to fade led is added. It will use the new API pwm_pin_
set_usec().

This app will be located in a new sub directory.

Jira: ZEP-745 ZEP-1029

Change-Id: I8d929a21f7de88307c47b52f98f131e00b2fdbe7
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-10-31 20:01:28 +00:00
Baohong Liu e1db5f2019 samples: pwm: use new APIs and rename the app
Replace existing APIs which will be deprecated by
the new API in this app and rename the app.

Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.

Since the two existing APIs (pwm_pin_set_period and
pwm_pin_set_values) used by this app will be deprecated,
this change is to replace them with the new API
pwm_pin_set_usec().

To demonstrate the usage of the new PWM APIs, more apps
will be added. All the apps will be located in their own
sub directories. The existing app is actually one to
blink LED. So, it is moved the "blink_led" sub directory.

Jira: ZEP-745 ZEP-1029

Change-Id: Icc3fbf6b6c25db9590c63bc08f40ec62c87c0f16
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-10-31 20:01:05 +00:00
Anas Nashif adf8a30b80 samples: move grove lcd to samples/grove
Change-Id: Ibf97ad2a4bd1234960f6da9585eff122e5876f62
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00
Anas Nashif fa06c5b879 samples: move basic samples to samples/basic
Change-Id: I0915158424d9f105959e436af3378dc52753347c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:14:31 +00:00
Anas Nashif 36e1e2dbaf move tests from samples to tests/
Change-Id: Ib183936134d27ff84d9af57e8e2e2d9f0cc2670f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-27 22:13:36 +00:00
Ricardo Salveti 702cd6cb52 samples/soc_flash_nrf5: test non-word aligned writes
Change-Id: I0c109d1632a84ab2f239b7034f18556519aa158e
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-10-25 00:34:29 +00:00
Chuck Jordan 4c6feac28e samples: modify w25q80b1 sample to output "done" when done.
This sample justs outputs the SPI FLASH IDs.
I think we should improve this to also output done, otherwise
it looks like its stuck or something.

Change-Id: I18d5919c1e25bb5aaa9ceba53793cc14b15f3c77
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2016-10-21 19:55:20 +00:00
Inaky Perez-Gonzalez 6ef9c853d1 samples/drivers/spi_lsm9ds0: don't run on QEMUs or FRDMs
These platforms don't have the hardware and will always fail.

Change-Id: I637d39f003bd1d507da0b5bb6fa12118040fcd63
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-10-19 17:56:48 +00:00
Lee Jones d14e4522eb samples: drivers: dma: Improve failure debug granularity
When the sample fails, it's difficult to identify whether it failed
during the configuration or transfer stage.  Provide a little more
information which will allude to the nature of the failure.

Change-Id: I5272ce73f56b0e51c8439d5510e512b616665705
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-17 00:22:59 +00:00
Anas Nashif 43f1c36ed5 samples: button: modify sample to work on more boards
Change-Id: Ib29dc5ce70618f6c4d0a4d732910ea67f92c37a5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-07 14:14:05 +00:00
Anas Nashif 179ce1c891 boards: remove obsolete board basic_minuteia
This board is not being used or tested and does not actually
run on any hardware, remove it in favor of well supported boards
for this CPU.

Jira: ZEP-850
Change-Id: I01c825c7eb44d6c321f2ffb88e8899da528921dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-22 22:09:34 +00:00
Anas Nashif 572f4a1a14 boards: remove obsolete board basic_cortex_m3
This board is not being used or tested and does not actually
run on any hardware, remove it in favor of well supported boards
for this CPU.

Jira: ZEP-850
Change-Id: Ied681b6059ad74f9d019054292c919a9f938e7d3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-22 22:09:33 +00:00
Anas Nashif 5363d14a9e boards: rename Quark SE Devboard to Quark SE C1000
This board now has an official name and will be available soon:

http://www.intel.com/content/www/us/en/embedded/products/quark/mcu/se-soc/overview.html

Jira: ZEP-758
Change-Id: Ia16d33722308cf81471321c3063bdc75055a4d50
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:31 +00:00
Anas Nashif 5e4b62c35c boards: rename Quark SE Devboard to Quark SE C1000 (Sensor Subsystem)
Jira: ZEP-758
Change-Id: I8ee5a2f9e4a6ecbd15214e59321bf27a502ef6ee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-16 03:10:30 +00:00
Anas Nashif 4589f2c468 samples: use printf/printk directly instead of macros
In many cases there is no need to define a macro for printing to
the console, just use the correct variant directly.

Jira: ZEP-240
Change-Id: I9952deda4bfc60424f01fca2443d037562d13d0d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-14 16:56:02 +00:00
Andrew Boie 9436765914 samples: dma: don't skip this test case
There is no reason to skip it.

Change-Id: I45a9aa3f05263c6deb017c1513cafb9af055037a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 17:53:22 +00:00
Anas Nashif c7faacf3d6 samples: move pci tests to tests/
Change-Id: Ibeb50b25b2f897dc1be87aa0739ef3f31d9015e8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:26:06 +00:00
Anas Nashif 1ecbea283c samples: move spi tests to tests/
Change-Id: I8d4a50bcbf479c35ccb209fbb04b5b1095075933
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-12 12:26:06 +00:00
Baohong Liu 56011cee50 samples: remove stts 751 sensor app
Remove this app, since the sensor is not on the
board any more.

Jira: ZEP-763

Change-Id: I931acfe9f01b817bc0b24a4e0745bf759e53da90
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-09-10 11:29:05 +00:00
Andy Ross fb1daa0f97 samples/uart: Use the proper console
Don't try to detect the UART device manually, the list is missing a
bunch of boards (the Quark SE sensor subsystem variant, and both
Arduino 101 halves).  There's a config variable for that.

Change-Id: I903e52dcb6025e5da824faadb5e4bc59221fa210
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-09-09 21:37:56 +00:00
Andy Ross ee56af2a29 samples/drivers/uart: Fix line endings
This output is going to a terminal device, not a Unix tty descriptor
which will cook the output for us.  Newline moves the cursor down.
Carriage return moves it to the start of a line.  We need both.

Change-Id: If93d1a85d16cea93b4788fa55e694a7b77055bfe
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-09-09 21:37:55 +00:00
Anas Nashif af1eaf489d samples: adc: make project configuration arch agnostic and cleanup
- Set default board to Quark SE Debvboard

Jira: ZEP-690, ZEP-760, ZEP-782
Change-Id: I7f7cc45b527a116f88cf45796e46b429ae6f0060
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-07 22:09:59 -04:00
Andrew Boie cb34a2b629 samples: i2c_fujitsu_fram: fix incorrect printk() usage
Change-Id: I211f3b17103e3399ca1057fcc477d526f4076255
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Baohong Liu 4a8f65cccf samples: pwm: adapt to new api argument definition
Change the api argument format following the API
argument definition change in the driver. Some
definitions of CONSTANTs were changed accordingly.

Correct some comment error.

Jira: ZEP-642

Change-Id: I1b34640aa70f1597076e035e2b3b576d8337129a
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-08-26 02:39:11 +00:00
Andrew Boie 2599c6075e Revert "sys_log: replace old debug macros at DMA sample"
This reverts commit 9a8ff013ab.

Change-Id: I1542d1275922671e89975479ec98e37d4b496eb3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:26:29 -07:00
Andrew Boie c18ec01fdc Revert "sys_log: replace old debug macro on ADC driver sample."
This reverts commit eeb2b733e4.

Change-Id: I4174d3c91b78856266fc457f8107c0043bba0416
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:25:58 -07:00
Andrew Boie a713d4be6f Revert "misc: Remove generic PRINT macros from button samples"
This reverts commit 2939752a3e.

Change-Id: I36b8788938bcfa0db48ef618919a9821714096d0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:19:45 -07:00
Andrew Boie b3d65931a5 Revert "misc: Remove generic PRINT macros from aio samples"
This reverts commit b39399b069.

Change-Id: Idfa8e277af6f23c522f0afc4d4d0f29cb6bae307
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:19:45 -07:00
Andrew Boie 03c40a2685 Revert "misc: Remove generic PRINT macros from pci samples"
This reverts commit a0007012b7.

Change-Id: I72f4b8adfc33c833116fef9fc1cd8c542f3979b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:19:45 -07:00
Andrew Boie 83298d8020 Revert "misc: Remove generic PRINT macros from flash samples"
This reverts commit a6412042fb.

Change-Id: I190d418103bfdd3d6714d1ac063cc1e533ce60ad
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:19:45 -07:00
Andrew Boie 4bcefbba73 Revert "misc: Remove generic PRINT macros from spi samples"
This reverts commit ea3a836e7e.

Change-Id: I7ad5d5c77244b3cec3eaed45a0348610bae15dec
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:19:45 -07:00
Andrew Boie 701f0598a8 Revert "misc: Remove generic PRINT macros from sensor samples"
This reverts commit 107f38acf6.

Change-Id: I6c5aa1323da485fc7a04452537d67c797a18bba5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-23 13:19:44 -07:00
Andrew Boie b1f206bc0f samples: pci_enum: build for sanitycheck
Change-Id: Ied0e889e2de102c5ccace64d51ac21672c53a231
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-15 09:38:53 -07:00
Juan Manuel Cruz Alcaraz 2939752a3e misc: Remove generic PRINT macros from button samples
Remove generic PRINT macros from button samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: Iae35d69a6a8473afdc1003ed629a21447a6f9a4a
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:56 +00:00
Juan Manuel Cruz Alcaraz b39399b069 misc: Remove generic PRINT macros from aio samples
Remove generic PRINT macros from aio samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: If50d8de2256f38902b5a4b68c57553cb5e8b8a94
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:56 +00:00
Juan Manuel Cruz Alcaraz a0007012b7 misc: Remove generic PRINT macros from pci samples
Remove generic PRINT macros from pci samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I5a556637c441b1a4117eb75463d66f7127355a59
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:56 +00:00
Juan Manuel Cruz Alcaraz a6412042fb misc: Remove generic PRINT macros from flash samples
Remove generic PRINT macros from flash samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I2a9b69e9eb82bbdb03af563bdc49c7ed51681580
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:55 +00:00
Juan Manuel Cruz Alcaraz ea3a836e7e misc: Remove generic PRINT macros from spi samples
Remove generic PRINT macros from spi samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: Ie377c7bba8b3cf2de05976cef5c4d814fa62b647
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:55 +00:00
Juan Manuel Cruz Alcaraz 107f38acf6 misc: Remove generic PRINT macros from sensor samples
Remove generic PRINT macros from sensor samples and replace
with SYS_LOG  module.

Jira: ZEP-240

Change-Id: I474efcd1daf8e621acd50d88b3a9662b8cd2b516
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2016-08-05 20:36:53 +00:00
Genaro Saucedo Tejada 9a8ff013ab sys_log: replace old debug macros at DMA sample
DMA sample application is now using new system log macros and updated
the .conf file.

JIRA: ZEP-311

Change-Id: I11dbd5c58205297751696e483fc049c1c4b7654c
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-31 18:13:12 +00:00
Ricardo Salveti b0ea33b2db samples: sample app for the nRF5 flash driver
Change-Id: Id6b5ce238784e281f8138448893a9f864cf92512
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2016-07-28 15:25:17 +00:00
Baohong Liu 0096a18d5e samples: Add DMA memory to memory transfer sample app
Add a sample app to show and test how the DMA memory
to memory transfer work.

Origin: Original

Change-Id: I0ff6790d9ba3e188cd2ad93d4c9a9c2405a84ac8
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-07-27 22:17:44 +00:00
Kuo-Lang Tseng 416f0759aa samples: aon counter: Remove outdated information in readme file
QMSI builtin source is already in zephyr build so update the
readme file.

Jira: ZEP-554

Change-Id: Ief525d94ad71fb94e01eec1eb43c10ca91825c35
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-07-26 17:50:35 +00:00
Inaky Perez-Gonzalez eb2d8b418c testcases: add automation markup to samples/
Code in samples does not follow an standarized format for reporting
success or operation failure -- thus we use markup (in file sample.tc)
to specify what shall be found in the console to consider execution a
success.

There is a few functional code modifications that add/extend console
messages so verification is possible or easier:

 - hello_world, synchronization: extend the success message to also
   print which core is running the testcase

- pci_enum: print message on success.

Change-Id: Idb6cea03adebe97d97854603f963f4e3d4cb856a
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-07-26 08:32:24 +08:00
Jon Medhurst 93f49c20e9 samples: uart: Check return value from uart_fifo_fill
If the UART FIFO is already full at the start of the irq tests (e.g.
because the data from the previous polled mode test is still being
transmitted), then uart_fifo_fill() may not not be able to add the
requested character to the FIFO and so return zero.

Fix this issue by repeating retrying uart_fifo_fill() until success.

Change-Id: I055ca1d4c91d81488b89f2a9b00031b9f2b8b222
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2016-07-21 16:16:24 +00:00
Javier B Perez 930669b840 samples: drivers: current_sensing: update tags testcase.ini
Updated tags to sensors in testcase.ini inside current_sensing sample.

Change-Id: Id2d5bfcbb1299ed6b1e386f774de46714669bf14
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-06-29 05:43:30 +00:00
Genaro Saucedo Tejada eeb2b733e4 sys_log: replace old debug macro on ADC driver sample.
ADC driver sample is now using system log.

Change-Id: I44f5189b3beb09a14d87842c5968127460eda710
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
JIRA: ZEP-311
2016-06-20 20:40:31 +00:00
Inaky Perez-Gonzalez fcec9e37c0 testcases: sanity check TCs get more language for real HW
Add more specifications or qualify some to the sanity check test cases
for them to be ran in real hardware:

 - kernel types (micro vs nano)
 - platforms / arches to exclude / include
 - one that is removed (for the PCI sample) as it cannot be ran
   without extra information

Change-Id: Id14dc15eb89358c3656d2814ea41bb6fec051278
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 23:49:56 +00:00
Milind Deore 7254f1d168 samples: gpio: lcd: sample app for HD44780 LCD controller
Display text strings on parallel interfacing HD44780 based
    generic LCD controller using GPIO pins to interface with
    Arduino Due(SAM3). HD44780 is a popular controller and an
    example can help using gpio pins in parallel with it. I
    have tested it on JHD20x4 LCD panel for 4Bits & 8Bits
    configuration. The code has been made generic so that user
    can modify quite a few options.

    Datasheets:
        http://lcd-linux.sourceforge.net/pdfdocs/hd44780.pdf

Signed-off-by: Milind Deore <tomdeore@gmail.com>
Change-Id: If2809222466b462fa2f4c42b14a514828530f082
2016-05-29 22:28:17 +00:00
Baohong Liu 14d3d37843 samples: I2c FRAM app bug fix
I2C_MSG_RESTART is not used in QMSI driver. What is really needed
here is I2C_MSG_STOP; Missing this flag is causing the issue.

JIRA: ZEP-398
Change-Id: I8fbfe15890c886ede4cce3d2cc68f53758a41e75
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-05-26 01:36:52 +00:00
ktseng 256efc40a8 sample/flash: update sample usage for flash erase operation
Demonstrated sequence of flash API calls to show write and erase
operations with the use of flash_write_protection_set API.

Jira: ZEP-383
Change-Id: I36e5b94519dbdf424dcfbcf7f38e5cf6437da7b8
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-05-25 13:31:13 +00:00
Anas Nashif c6343f5271 apds9960: Fix reference to i2c driver
Also make the CONF_FILE  variable overridable

Change-Id: I44251cfd66648a665ff04dfcd38e750c24af5734
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 21:32:01 +00:00
Anas Nashif b8de79239f samples: Use GPIO_0 as the default instance
Change-Id: Ibe9d0add007487cd47fd2a26df992ff9614883b3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-20 10:54:06 -04:00
Anas Nashif f62d86c42b samples: get rid of obsolete usage of ARCH variable
Using ARCH variable to select different configurations for the different
architectures is misleading and conflicts with the variable ARCH being used by
the build system.  The variable is not needed, it is application specific and
an application can be built without the need to specify ARCH on the command
line.

This is yet another item specific to samples and test cases that
wrongfully being used and documented for every application.  We need to use
another variable and just make it clear it is specific to samples and how they
are written.  One possible solution is to have a script that gets the
architecture based on the board being used.  Attachments

Jira: ZEP-238
Change-Id: Ieccbc087a41858fb96fb361c0aaa04705e968a4e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:28 +00:00
Anas Nashif fbe7d90ead spi: consalidate and simplify
Use the same Kconfig infrastructure and options for all SPI drivers.

Jira: ZEP-294
Change-Id: I7097bf3d2e1040fcec166761a9342bff707de4dd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:26 +00:00
Anas Nashif 1d547699a5 aio: unify kconfig variables and make them consistent
Change-Id: Ic3e4f1142a3d4dcde5947586bb4ad86372b3f70b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:24 +00:00
Anas Nashif 1ee7175de9 rtc: unify kconfig variable names
Change-Id: I2adc0b21944fc0af85d40c09deac14bdbf134178
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:24 +00:00
Anas Nashif 72bf29eb03 watchdog: unify kconfig variables
Use consistent naming for watchdog drivers.

Change-Id: Idcec987253ce1b6230ccdf29cd8149d0bd705052
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:24 +00:00
Anas Nashif 0140da310b i2c: unify kconfig options and share them across drivers
Reduces Kconfig variables by ~20

Change-Id: If39f7d49482d62417c621f98bc8c0c78df0d4139
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-12 10:57:22 +00:00
Anas Nashif 8f73a27035 samples: i2c_lsm9ds0: we are using printk only
printk is enabled by default.

Change-Id: Id10cb0678c32db98e7cfb313fe9681783cc0267c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 13:43:31 -04:00
Anas Nashif fab4f4def6 samples: pwm: rename local configuration and use printk
Change-Id: Idd72bb8c7147911e0bf19c157ac8294b936684a5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 13:43:31 -04:00
Anas Nashif 7d64e54577 led_apa102c: rename local configuration and use printk
Change-Id: I14192240fdcc595f1a9aa12513c72b07886ae210
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 13:43:31 -04:00
Anas Nashif 79ba6c5d47 gpio: unify kernel configuration for all architectueres
This also enables GPIO on ATMEL SAM3 when GPIO is set.

Change-Id: I4125af4910d57bed98b0ee4967fb696e3f345e67
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 13:43:26 -04:00
Anas Nashif 407eb36ec4 sensor: apds9660: remove IP specific GPIO configs
The driver and port used are already configured per port, no need
to hardcode the sample to a specific driver.

Change-Id: I8056e35db1e0970ec4ad56ce14fe5654fac9cf3e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-30 13:02:03 -04:00
Anas Nashif 19542114de samples: gpio: sanitize test and remove obsolete options
- CONFIG_GPIO_DW_0_BITS is not longer available
- Use default printk
- Do not enable debug
- remove useless whitelist in testcase.ini, we already whitelist
  boards

Change-Id: If21795d544e268c26a757b697ce3c9f2e56db65f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-28 12:29:33 +00:00
Anas Nashif d18b584427 grove: use default i2c device set in Kconfig
Change-Id: I2925bb0f5f8f0537f5c21e8650b03c281081035e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:48 +00:00
Anas Nashif 9d8c332b21 i2c: use I2C_X nameing instead of I2CX
Other IOs use this format, so lets be consistent and use

I2C_0 instead of I2C0 and I2C_1 an instead of I2C1.

Change-Id: I591ab08e14bd533ef0fac38e596559da783863b8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-25 17:01:48 +00:00
Tomasz Bursztyka 8386a49929 samples: Using new GPIO API callbacks
Adapting GPIO samples to use the new callback format.

Change-Id: I944dce4faeeee30117edbd7a065e40caa0b7ed66
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-22 22:17:39 -04:00
Anas Nashif a6915c070d qmsi: spi: use built-in qmsi driver
Change-Id: Ic7e86e015d4beb11a01d75aa50bc50f95c784e5e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:55:36 -04:00
Anas Nashif b3e02b406a qmsi: adc: use built-in qmsi driver
Fix naming and use a global driver name for instance.

Change-Id: I30a54cb9c20773e1b6fdc57b934aa564612a6c45
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:55:36 -04:00
Anas Nashif 85b3c2c62a qmsi: gpio: use built-in qmsi driver
Change-Id: I11444bcc146dbc477bb605f6b405bee559716f2a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:55:36 -04:00
Anas Nashif f4feacf8b2 qmsi: aon_counters: use built-in qmsi driver
Change-Id: I5df98e9eacf429f017a094c861dcf54ab61566c1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:46:29 -04:00
Anas Nashif e6ab39a9c2 aio: rename sample name and make it generic
Change-Id: I3bd0a8b50551bec0bf4afeb6a912f558bc106de8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:46:29 -04:00
Anas Nashif b512681f8c qmsi: aio: use built-in qmsi driver
Change-Id: I24b227d9367a4f0144cb9fa968a51827f8c2dfc5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:46:29 -04:00
Anas Nashif 82d4c96bd4 pwm: unify driver names
Use same string for driver name used for binding and fix
sample app to work with multiple drivers, not only DW driver.

Change-Id: I4d40aa9d4e83fcf16dc883bb74c3f0e3e30e3502
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-22 20:46:29 -04:00
Baohong Liu 1a164b85f0 samples: Use consistent file naming for project config file
Some sample applications are using file naming .config which are
inconsistent from others. Changed them to .conf.

Change-Id: I2ea3944f3809671d4c6f4782dbf77fe9c2a22864
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-04-16 21:12:19 +00:00
Flavio Santes 051a37dbd7 wdt: update sample code
Remove wdt_fired, whose existence is irrelevant.

Change-Id: I27e5f5fe449423cd747b34fc6a38d261ae02d1e3
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-04-15 18:28:26 +00:00
Baohong Liu 5ba89ffdea samples: A test app for spi flash
Demonstrate the use of SPI flash driver API on Arduino 101 board.

This is a re-submit of a previous merged patch which was reverted
because merge sequence was incorrect (the test app got merged
before the driver).

Origin: Original

Change-Id: I3fce61488ed7d48f400c12448f1c7a01c555661c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2016-04-12 09:59:33 +00:00
Daniel Leung 8f1986f8ee samples/drivers: extend PWM app to FRDM_K64F
This extends the pwm_dw sample app to build for
FRDM_K64F board also. Because of this, pwm_dw
has been renamed to pwm.

This allows us to put it through sanity test
to catch build breakage.

Change-Id: Ie4d7442af43ede58f4cec0ec28643384a685321a
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 23:17:24 +00:00
Daniel Leung 0761a1da87 samples: enable sanity check of I2C driver on Arduino Due
This adds the necessary tags to enable building the grove_lcd and
i2c_fujitsu_fram sample apps, so that the Atmel SAM3 I2C driver
will be built to test for build breakage.

Change-Id: I4adfb6336e82a6d407bbd5e9888c27d5f6bc5be1
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-31 11:47:01 +00:00
Anas Nashif 897bb66e9f spi_test: remove dependency on driver name from kconfig
Use SPI_0 by default or SPI_1 if configured differently.

Change-Id: I63f39f63a4b70fded3a7af8061058ba4779e573e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-29 01:31:44 +00:00
Daniel Leung 8df10d4584 kconfig: untangle ordering and dependencies
There are two major issues with the kconfig:

() Some of the config options have incorrect dependencies inside help
   under menuconfig. For example, CONFIG_GPIO depends on BOARD_GALILEO.

() Since the SoC and board specific kconfig files are parsed first,
   the help screen would say, for example, CONFIG_SPI is defined at
   arch/arm/soc/fsl_frdm_k64f/Kconfig. This is incorrect because
   the actual config is defined in drivers/spi/Kconfig.

These cause great confusion to users of menuconfig/xconfig.

To fix these, the SoC and board defaults are now to be parsed last.

Note that the position swapping of defaults in this patch is due to
the fact the the default parsed last will be used.

And, spi_test is broken due to the fact that it requires
CONFIG_SPI_INTEL_PORT_1, but never enables it anywhere. This is
bypassed for now.

Origin: refactored and edited from existing files
Change-Id: I2a4b1ae5be4d27e68c960aa47d91ef350f2d500f
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-26 20:36:32 -04:00
Anas Nashif 9916452085 samples: w25q80bl: configure sample with correct board
Also enable GPIO and add expected output to the README

Change-Id: I2117d53dc6f90394394c6a8dd9f308a01a110634
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-23 15:56:47 +00:00
Andre Guedes 4048a59be3 counter: Fix returning code
Counter API and drivers were merged without fixing the new returning
error convention (errno.h codes). This patch fixes all occurrences of
DEV_* codes so -E* codes are used instead.

Change-Id: I85007e8565686b52121410badea547ed904460a0
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-23 15:55:11 +00:00
Maciek Borzecki 47d88b25ec samples/button: button input example
An example of button driver.

Change-Id: I8af860058166d7ca5653f50ff585bc9784008f78
Origin: Original
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-03-18 20:59:23 +00:00
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