Commit graph

221 commits

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