Commit Graph

27 Commits

Author SHA1 Message Date
Gregory Nutt
7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
Gregory Nutt
936df1bcb5 Adds new OS internal functions nxsig_sleep() and nxsig_usleep. These differ from the standard sleep() and usleep() in that (1) they don't cause cancellation points, and (2) don't set the errno variable (if applicable). All calls to sleep() and usleep() changed to calls to nxsig_sleep() and nxsig_usleep().
Squashed commit of the following:

    Change all calls to usleep() in the OS proper to calls to nxsig_usleep()

    sched/signal:  Add a new OS internal function nxsig_usleep() that is functionally equivalent to usleep() but does not cause a cancellaption point and does not modify the errno variable.

    sched/signal:  Add a new OS internal function nxsig_sleep() that is functionally equivalent to sleep() but does not cause a cancellaption point.
2017-10-06 10:15:01 -06:00
Gregory Nutt
9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Gregory Nutt
e9a5477506 Add an instance argument to the SPIDEV definitions. 2017-04-29 12:26:52 -06:00
Sebastien Lorquet
aca2e36d67 stm32 devboards 2017-04-28 18:26:05 +02:00
Gregory Nutt
f9e402018b Buttons: Change return value of board_buttons() and the type of btn_buttonset_t to uint32_t so that more than 8 buttons can be supported. 2017-04-09 07:22:49 -06:00
Gregory Nutt
7a9a3bea2f stm32_gpiosetevent: GPIO IRQ function should not return the xcpt_t oldhandler. This value is useful and potentially dangerous by itself after the change to assocaite a argument with the interrupt handler. 2017-03-02 18:36:14 -06:00
Gregory Nutt
67de2e5f66 Add argument to STM32 EXTI interrupt handlers. 2017-02-27 14:21:30 -06:00
Gregory Nutt
2e30b9b252 More missing argument paramters in interrupt handlers. 2017-02-27 07:46:36 -06:00
Gregory Nutt
ee2852f5ff Remove all references to board_adc_setup() 2016-12-05 17:06:08 -06:00
Gregory Nutt
cfad547b8d Changes from review of PR 118 2016-08-18 11:29:48 -06:00
Michał Łyszczek
abcb00bf7d Add support for otgfs device class 2016-08-18 18:06:05 +02:00
Michał Łyszczek
3d609f858b Fix warnings in 'non implemented' functions 2016-08-18 16:16:19 +02:00
Michał Łyszczek
bd5eb5233c Added check to make sure USBDEV is not set with USBHOST 2016-08-17 22:13:27 +02:00
Michał Łyszczek
12e97600ee Remove unncessary FAR pointers 2016-08-17 22:07:10 +02:00
Michał Łyszczek
5026c192b2 Add g_ prefix for global variable 2016-08-17 22:05:12 +02:00
Michał Łyszczek
2315ed85cc Add missing guard for header file 2016-08-17 22:03:24 +02:00
Michał Łyszczek
efead3e564 Add debug messages, some more code refactoring 2016-08-17 21:53:04 +02:00
Michał Łyszczek
2ae38b6bc6 Refactored: function names, coding style 2016-08-17 21:34:51 +02:00
Michał Łyszczek
44e0a837a8 Add usb mouse and hub support 2016-08-17 20:20:15 +02:00
Michał Łyszczek
e7445f9556 Add otgfs support (host only) 2016-08-17 20:13:17 +02:00
Michał Łyszczek
795db7c103 Add support for onboard joystick 2016-08-15 21:52:00 +02:00
Michał Łyszczek
83fca7ded7 Add support for spi sdcard with card detection logic 2016-08-15 17:34:43 +02:00
Michał Łyszczek
8c396a2986 Add adc support (on-board potentiometer) 2016-08-14 17:16:49 +02:00
Michał Łyszczek
47fae83b16 Add minimal support for Kamami stm32butterfly2 development board
Supported is:
* LED1-4
* UART2 (terminal for nsh)
2016-08-14 16:32:11 +02:00