Commit graph

221 commits

Author SHA1 Message Date
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