Commit graph

41120 commits

Author SHA1 Message Date
Ricardo Salveti
a9f2061dfb gpio: stm32: introduce alternative function config
STM32F4 requires the alternative function config to be set, so just
initialize that as part of the gpio configure call.

Change-Id: I33a4a8efec59c5ebe7dc3f3580f0dd2bf7ded7f4
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2016-10-27 14:48:43 +00:00
Maureen Helm
3bdc77ee09 sensor: fxos8700: Add accelerometer/magnetometer driver
Adds basic sensor driver support for the NXP FXOS8700 6-axis
accelerometer/magnetometer. Currently this driver supports
accelerometer-only, magnetometer-only, and hybrid (accelerometer +
magnetometer) modes, as well as 2g, 4g, and 8g accelerometer full scale
ranges.

This driver does not yet support any sensor triggers such as the data
ready trigger, or runtime changing of sensor attributes.

Datasheet:
http://cache.nxp.com/files/sensors/doc/data_sheet/FXOS8700CQ.pdf

Origin: Original
Jira: ZEP-721

Change-Id: Iff0f751c737196f60d5c5d3448631b57093ece34
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2016-10-27 14:36:43 +00:00
Allan Stephens
884d9961ae unified: Add sample project using K_THREAD_DEFINE()
Also demonstrates use of k_thread_spawn() and K_SEM_DEFINE().

Change-Id: Id2f32ea38d2b5fea40f90a7ef6665231e4158cb3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:36:14 -05:00
Allan Stephens
88095027f4 unified: Ensure K_THREAD_DEFINE() generates a thread id
Previously the macro provided no way for an application to
easily reference a statically-defined thread.

Change-Id: I552e5f4ab4e6e8a793bb3a6a2b0c2636b900023a
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:36:14 -05:00
Allan Stephens
743bdb8143 unified: Enable handling of thread options for static threads
Change-Id: I51d2d9cfa0eeb5f974a6cf1db32406399ef57418
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:36:14 -05:00
Allan Stephens
6cfe1322f8 unified: Streamline thread initialization macros
The _THREAD_INITIALIZER() macro is now used in all cases where
a static thread is defined. It accepts the arguments used by
k_thread_spawn(), as well as the legacy abort function and task
group arguments.

The two remaining legacy macros required to support static threads
now appear in legacy.h.

Change-Id: I7ba24c285beee63d63c8da0e0fa120f35c0d9526
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:14:51 -05:00
Allan Stephens
7c5bffa669 unified: Add options field to static thread initialization structure
Adds the field, in preparation for making use of it in the future.

Also re-orders the existing fields of the _static_thread_data
structure so they appear in the same order as the arguments
to k_thread_spawn(). This makes it easier to ensure all of the
arguments and fields are handled in a consistent manner.

Change-Id: I401687ecfdacd52c05ab95af7f12d8dc658ed419
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:14:51 -05:00
Allan Stephens
0eae13d6de unified/test: Fix typo in kernel's test_task application
The wrong tag name was used to mark the test as compatible
with the unified kernel.

Change-Id: Idda5d5e0993447270e7131c42c224df8dcd59282
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-10-27 08:14:51 -05:00
Szymon Janc
ccadd4b006 net: Use proper format for printing size_t
size_t should be printed with %zu. This also fix build error on
unified kernel due to ZEP-1133.

Change-Id: I9c5fc7f7de365e47bd0973913b94baa80f7907e3
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
2016-10-27 08:08:27 +00:00
Anas Nashif
91d7bdd54f samples: kernel_event_logger: filter platforms by SRAM size
Change-Id: Ieeede04b122a697ff3cd83252677c0a12e428d56
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 20:56:42 -04:00
Anas Nashif
5925eaf5f1 optimize testcase runs for sensors
Change-Id: If701d1824572bed068712750fbd14758806ba70f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 23:47:39 +00:00
Anas Nashif
511339f54c samples: cleanup sensor samples
- remove useless Kconfigs
- remove SPI DW kconfigs, we now use QMSI driver
- Cleanup readme and turn into ReST

Change-Id: Ie1f39e0afabf499fa81627ded59adf267e01993a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 23:47:21 +00:00
Anas Nashif
95bf69197d samples: sensors: cleanup mcp9808 sample and refine documentation
Enhance documentation and build for Quark D2000 Devboard by default.

Change-Id: I3417c31a8898a076465d25f45d7821820b480290
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 23:46:38 +00:00
Benjamin Walsh
115d118a2e unified: remove mention of 'fiber' in kernel_event_logger
Adapting to unified kernel naming of 'coop thread'.

Change-Id: I66cb766c2269acf0867e434bc21f633ea1111f89
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:14 +00:00
Benjamin Walsh
14ec7af62c unified: update kernel event logger doc
- replace instances of 'task' and 'fiber' with 'coop' and 'preempt'
  thread
- remove reference to task monitor and task transition logging, since
  this is a concept that is irrelevent in the unified kernel.

Change-Id: I31eef8d7894c45183f6a13cc3fdaa2e6214e8da3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:10 +00:00
Benjamin Walsh
10f30a5f61 kernel event logger: fix longer-than-80 chars lines
Change-Id: I503c18d339a0731b0fcbb7b83b3dc16b08c2d7a1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:07 +00:00
Benjamin Walsh
c2aecb26cc samples: fix kernel_event_logger to work with unified kernel
The test is modified to key on CONFIG_TASK_MONITOR instead of
CONFIG_MICROKERNEL, since that is what it was really interested in.
Also, this allows the unified kernel to work w.r.t. task monitoring,
since that is a concept that is alien to the unified kernel, since there
are no more task transitions recorded as part of a kernel server. The
unified kernel does not have a CONFIG_TASK_MONITORING option.

To make this work, since the kernel_event_logger sample makes use of the
philosophers demo, the latter had to be modified as well. The nanokernel
philosophers demo would not work with the unifed kernel since it
identifies as a microkernel, and in that case the test would be looking
for symbols defined in an MDEF file, which the nanokernel demo does not
provide of course; the same thing applies to the nanokernel
kernel_event_logger sample. Instead, the demo defines NANO_APIS_ONLY=1,
which is really what it is interested in. To allow that definition to
exist, the nanokernel philosophers demo and both the nano/micro
kernel_event_logger samples add src/ directory with its own Makefile and
add their own phil_fiber.c and phil.h files, which simply include the
original files from the microkernel philosophers demo. As a final
change, the kernel_event_logger samples need a different prj.conf file
for the unified kernel, since it needs a bigger idle stack than the
default, since the kernel event logger does work in the idle thread when
the kernel goes to sleep.

Change-Id: I4cac45a32d09d6ca1de052a368b3219f64889869
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:38:03 +00:00
Benjamin Walsh
673cd8bc2b unified: add _sem_give_non_preemptible()
Needed by the kernel event logger when it records a context switch.

The kernel event logger releases a semaphore when a new event is
available in the log so that a thread can consume the event. However,
giving that semaphore cannot add a context switch event itself in the
log or the logger would be caught in an infinite loop.

Change-Id: I571a4aa0d302775e09cdc2d654a6b61f8b2e42c7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:37:59 +00:00
Benjamin Walsh
162cbdd22f unified: map legacy nano sem give APIs directly to unified kernel APIs
For some reason, the legacy nanokernel semaphore "give" APIs were
implemented as macros that took a parameter instead of doing a straight
mapping to the unified kernel functions that provide the equivalent
functionalities. This prevented passing the nanokernel semaphore APIs as
function pointers to other APIs.

One such subsystem that does this is the kernel event logger.

Change-Id: Ib302167c9907d2c8ac1f9beef1eef093b48abf61
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:37:54 +00:00
Benjamin Walsh
1125c2b00e unified: correct comment about number of threads in phil demo
A bit of work has to be done by someone why wants to run the demo with a
different number of threads than the default.

Fixes ZEP-1077.

Change-Id: Ibb5cfed2bd9984bcf0f9d65f957f32daf4c5211e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-10-26 23:06:25 +00:00
Marcus Shawcroft
1a13bb8c40 sensor/hp206c: Limit namespace, add static.
Change-Id: I08d0029fae70434794e09a7c9563383d1db58fe0
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 16:52:15 -04:00
Marcus Shawcroft
a2e91dadb3 drivers/hp206c: Make driver_api structure const.
Change-Id: I6e3c7e4e420d9b9c55bbb49cf6f13b6e09ec4bb7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-26 16:52:15 -04:00
Marcus Shawcroft
e7a943385d test: drivers/build_all support HP206C
Change-Id: Ifad32d59a9786e5b1334532c5c6e7f29657c2a77
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:10 +00:00
Marcus Shawcroft
2030855399 sensor/hp206c: Correct the SYS_CLOCK_TICKS_PER_SEC diagnostic text.
Correct the text of the SYS_CLOCK_TICKS_PER_SEC #error diagnostic to
reflect the actual logic of the gate.

Change-Id: I28ad324b0b246e4a8de29b64483a97577a1b6fb7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:09 +00:00
Marcus Shawcroft
807a103653 watchdog/iwdg_stm32: Limit name space, add static.
Change-Id: I497e2afe0a0e700c1fb95ef50338d44e601248df
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:09 +00:00
Marcus Shawcroft
abb99c377d soc/stm32f1: Enable IWDG_STM32 dependent on WATCHDOG
The STM32F1 range all have the independent watchdog, enable the driver
by default if CONFIG_WATCHDOG is enabled.

Change-Id: I3869884dc51c56194367b46007c87f6cee699689
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:08 +00:00
Marcus Shawcroft
a2017aafa1 watchdog/iwdg_stm32: Fix missing include compilation error.
Change-Id: I0dae37eae451452e6071639b5258634c44c7ccbf
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:08 +00:00
Marcus Shawcroft
f201b2e79a test: drivers/build_all add CONFIG_WATCHDOG
Change-Id: Ie28877dcb07136cf088b151d8394de606603bfa7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:08 +00:00
Marcus Shawcroft
b5dba510d0 test: drivers/build_all refactor, impose some order...
Change-Id: I2fc6c43d489193e39f643d8cac1a8ba6ea57a896
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:07 +00:00
Marcus Shawcroft
bcc7f633fc drivers/watchdog: Make WDT_0_IRQ_PRI dependent on WDT_QMSI
The config variable WDT_0_IRQ_PRI is intended to be generic across a
range of watchdog drivers, however it has no default value which means
that if CONFIG_WATCHDOG is enabled, but no driver is provided for a
specific board the the configuration will fail.  For now, make
WDT_0_IRQ_PRI depend on the only driver that uses it.

Change-Id: I54708d66ac8fbc2ef657a1ef4510eb5e7a2cff28
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:07 +00:00
Marcus Shawcroft
27f4947812 driver/gpio/dw: Limit name space, add static.
Change-Id: I3b1f5497896f683072c2bc473d348cd19aca3c5d
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:06 +00:00
Marcus Shawcroft
c8d6ff0474 driver/gpio/sam3: Limit name space, add static.
Change-Id: Ie34094e3ed8041b2b2c44e122f71d5f69a7ce0ad
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:06 +00:00
Marcus Shawcroft
113bf7c44e driver/flash/w25qxxdv: Limit name space, add static.
Change-Id: I207438d08ab109a448b83e937b19d9503acbbcfb
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:06 +00:00
Marcus Shawcroft
670f7328e8 driver/eth_ksdk: Limit name space, add static.
Change-Id: I45bad57f7a120c74c072287963a2c43f081bcea3
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:05 +00:00
Marcus Shawcroft
ab7a768a18 driver/eth_dw: Limit name space, add static.
Change-Id: If9de0bec8bafb66119e158782cf9618143dc2a52
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:05 +00:00
Marcus Shawcroft
12c20ef37f driver/ti_adc108s102: Limit name space, add static.
Change-Id: I711a11a3e41626f8f3e97bcb891c6cf048200ee1
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:04 +00:00
Marcus Shawcroft
741d4751b2 driver/enc28j60: Limit name space, add static.
Change-Id: Ibf03dbb5134df81ca26aebe1e0518f1973789952
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:04 +00:00
Marcus Shawcroft
b70feefaf4 drivers/aio_comparator: Limit name space, add static.
Change-Id: I2b6da1f45f838e9690dcff1bb770c9717cbffede
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:04 +00:00
Marcus Shawcroft
31c39d8f4e drivers/pinmux_dev_atmel_sam3x: Limit name space, add static.
Change-Id: Ic4d23e33b5900137fc7f59f1e320e4844ae44a54
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:03 +00:00
Marcus Shawcroft
0cb864cada grove/lcd: Limit name space, add static.
Change-Id: I1efc5def0a205964309e719f5a1d4e00ce154f12
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:03 +00:00
Marcus Shawcroft
a7c5ec1150 ieee802154: Limit name space, add static.
Change-Id: Iaf33a902b90a649ebe8591c33798ad4e583ee33a
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:02 +00:00
Marcus Shawcroft
c8a359c039 grove/i2c/dw: Limit name space, add static.
Change-Id: I949d07a962c9dc409de9c458a09a9d829f791496
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:02 +00:00
Marcus Shawcroft
cbc5a66505 pinmux/dev_stm32: Limit name space, add static.
Change-Id: I023d921b35e5c3188b70bf3413c390f29628d380
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:01 +00:00
Marcus Shawcroft
94e460a92c drivers/isl29035: Make driver_api structure const.
Change-Id: If1d0adeee94663d84049bd8de0de529672ce4dbf
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:01 +00:00
Marcus Shawcroft
ac80aa003d drivers/pinmux_dev_stm32: Make driver_api const.
Change-Id: I272dba2e43d270bae5faf63e0955e218d6f392b2
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:01 +00:00
Marcus Shawcroft
eb2f6e0325 wdt_qmsi: Make driver_api const.
Change-Id: I35055a6c5d41b3a9474fef45b9e7f8662f286c65
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:51:00 +00:00
Marcus Shawcroft
f84ce64390 serial/uart_nsim: Make driver_api const.
Change-Id: Iefa9afe9cfdbb40e27c6e27f28c26dfea042ca79
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:50:59 +00:00
Marcus Shawcroft
2e71621149 drivers/rtc_qmsi: Make driver_api const.
Change-Id: I136a31c1955bf4aef834d2c1156b1eed9f6dfa75
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:50:59 +00:00
Marcus Shawcroft
e8e6bead80 drivers/pinmux_dev_k64: Make driver_api const.
Change-Id: I89d8ccbd78a2bbb04ad60a7520c1b7b7b58016ad
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:50:59 +00:00
Marcus Shawcroft
a8dfccc207 drivers/ipm_quark_se: Make driver_api const.
Change-Id: I73077c22b17b0035f3828a0c3a16198abfbf79cc
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2016-10-26 20:50:58 +00:00