Version 1.7.
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -48,6 +48,7 @@ NIIBE Yutaka:
|
|||||||
|
|
||||||
Under contract of g10 Code GmbH, wrote:
|
Under contract of g10 Code GmbH, wrote:
|
||||||
mcu/usb-usbip.c
|
mcu/usb-usbip.c
|
||||||
|
contrib/usart-stm32f103.c
|
||||||
|
|
||||||
Paul Fertser:
|
Paul Fertser:
|
||||||
Added Blue Pill support.
|
Added Blue Pill support.
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2017-12-19 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* VERSION: 1.7.
|
||||||
|
* doc/chopstx.texi (VERSION): 1.7.
|
||||||
|
|
||||||
2017-12-18 NIIBE Yutaka <gniibe@fsij.org>
|
2017-12-18 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* contrib/usart-stm32f103.c: New.
|
* contrib/usart-stm32f103.c: New.
|
||||||
@@ -14,7 +19,7 @@
|
|||||||
|
|
||||||
* mcu/sys-stm32f103.h (BOARD_ID_FST_01G): New.
|
* mcu/sys-stm32f103.h (BOARD_ID_FST_01G): New.
|
||||||
|
|
||||||
* contrib/adc-stm32f103.c (get_adc_config): Add case for
|
* contrib/adc-stm32f103.c (get_adc_config): Add a case for
|
||||||
BOARD_ID_FST_01G and BOARD_ID_ST_NUCLEO_F103.
|
BOARD_ID_FST_01G and BOARD_ID_ST_NUCLEO_F103.
|
||||||
|
|
||||||
2017-11-24 NIIBE Yutaka <gniibe@fsij.org>
|
2017-11-24 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|||||||
6
NEWS
6
NEWS
@@ -3,12 +3,12 @@ NEWS - Noteworthy changes
|
|||||||
|
|
||||||
* Major changes in Chopstx 1.7
|
* Major changes in Chopstx 1.7
|
||||||
|
|
||||||
Released 2017-12-XX
|
Released 2017-12-19
|
||||||
|
|
||||||
** Fix: timer wakeup
|
** Fix: timer wakeup
|
||||||
Timer expiration had a bug. When it is waken up, the wake up doesn't
|
Timer expiration had a bug. When it is waken up, the wake up doesn't
|
||||||
handle as timer expiration when there are multiple threads on same
|
handle as a timer expiration when there are multiple threads on same
|
||||||
wake up timing.
|
timing of expire. It confuses as if it were forced wakeup.
|
||||||
|
|
||||||
** New driver: USART for STM32.
|
** New driver: USART for STM32.
|
||||||
USART driver for STM32 is added.
|
USART driver for STM32 is added.
|
||||||
|
|||||||
7
README
7
README
@@ -1,6 +1,6 @@
|
|||||||
Chopstx - Threads and only Threads
|
Chopstx - Threads and only Threads
|
||||||
Version 1.7
|
Version 1.7
|
||||||
2017-12-XX
|
2017-12-19
|
||||||
Niibe Yutaka
|
Niibe Yutaka
|
||||||
Flying Stone Technology
|
Flying Stone Technology
|
||||||
|
|
||||||
@@ -17,6 +17,11 @@ stacks, Chopstx just offers a simple RT thread library.
|
|||||||
With Chopstx, interrupt handling is also done by a thread. This
|
With Chopstx, interrupt handling is also done by a thread. This
|
||||||
enables coherent code for ease of maintenance.
|
enables coherent code for ease of maintenance.
|
||||||
|
|
||||||
|
While threads are important, we don't need more threads than
|
||||||
|
necessary. Chopstx provides a feature of poll, so that we can
|
||||||
|
minimize use of threads.
|
||||||
|
|
||||||
|
|
||||||
Note that this library is _not_ related to the hand game:
|
Note that this library is _not_ related to the hand game:
|
||||||
|
|
||||||
https://en.wikipedia.org/wiki/Chopsticks_(hand_game)
|
https://en.wikipedia.org/wiki/Chopsticks_(hand_game)
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ chx_request_preemption (uint16_t prio)
|
|||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* 1 on wakeup by others.
|
* 1 on wakeup by others.
|
||||||
* 0 on normal wakeup (timer expiration, getting lock).
|
* 0 on normal wakeup (timer expiration, lock aquirement).
|
||||||
* -1 on cancellation.
|
* -1 on cancellation.
|
||||||
*/
|
*/
|
||||||
static uintptr_t __attribute__ ((naked, noinline))
|
static uintptr_t __attribute__ ((naked, noinline))
|
||||||
|
|||||||
@@ -617,7 +617,7 @@ usart_send_break (uint8_t dev_no)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if ((USARTx->CR1 & 0x01))
|
if ((USARTx->CR1 & 0x01))
|
||||||
return 1; /* Busy sending break, which was requested before. */
|
return 1; /* Busy sending break, which was requested before. */
|
||||||
|
|
||||||
USARTx->CR1 |= 0x01;
|
USARTx->CR1 |= 0x01;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
\input texinfo @c -*-texinfo-*-
|
\input texinfo @c -*-texinfo-*-
|
||||||
@c %**start of header
|
@c %**start of header
|
||||||
@setfilename chopstx.info
|
@setfilename chopstx.info
|
||||||
@set VERSION 1.6
|
@set VERSION 1.7
|
||||||
@settitle Chopstx Reference Manual
|
@settitle Chopstx Reference Manual
|
||||||
@c Unify some of the indices.
|
@c Unify some of the indices.
|
||||||
@syncodeindex tp fn
|
@syncodeindex tp fn
|
||||||
@@ -60,7 +60,8 @@ section entitled ``Copying''.
|
|||||||
@menu
|
@menu
|
||||||
* Introduction:: What is Chopstx.
|
* Introduction:: What is Chopstx.
|
||||||
* Threads and only Threads:: Threads and only Threads.
|
* Threads and only Threads:: Threads and only Threads.
|
||||||
* Note: Use of sleep mode:: Use it carefully.
|
* Poll or Pole:: Poll or Pole.
|
||||||
|
* Note (Use of sleep mode):: Use it carefully.
|
||||||
* API:: API.
|
* API:: API.
|
||||||
|
|
||||||
Appendix
|
Appendix
|
||||||
@@ -90,11 +91,16 @@ Cortex-M3 and GNU/Linux emulation. Specifically, it is used for
|
|||||||
STM32F030, MKL27Z, STM32F103 and as a command on GNU/Linux.
|
STM32F030, MKL27Z, STM32F103 and as a command on GNU/Linux.
|
||||||
|
|
||||||
While most RTOSes come with many features, drivers, and stacks,
|
While most RTOSes come with many features, drivers, and stacks,
|
||||||
Chopstx just offers a RT thread library.
|
Chopstx just offers an RT thread library.
|
||||||
|
|
||||||
With Chopstx, interrupt handling is also done by a thread. This
|
With Chopstx, interrupt handling is also done by a thread. This
|
||||||
enables coherent code for ease of maintenance.
|
enables coherent code for ease of maintenance.
|
||||||
|
|
||||||
|
While threads are important, we don't need more threads than
|
||||||
|
necessary. Chopstx provides a feature of poll, so that we can
|
||||||
|
minimize use of threads.
|
||||||
|
|
||||||
|
|
||||||
@node Threads and only Threads
|
@node Threads and only Threads
|
||||||
@chapter Threads and only Threads
|
@chapter Threads and only Threads
|
||||||
|
|
||||||
@@ -129,8 +135,17 @@ support more performance (frequency). In general, such an example is
|
|||||||
best suited by hardware (not software).
|
best suited by hardware (not software).
|
||||||
|
|
||||||
|
|
||||||
@node Note: Use of sleep mode
|
@node Poll or Pole
|
||||||
@chapter Note: Use of sleep mode
|
@chapter Poll or Pole
|
||||||
|
Chopstx provides the @code{chopstx_poll} function to wait on multiple events.
|
||||||
|
|
||||||
|
Using @code{chopstx_poll}, we can write an application by event-driven
|
||||||
|
programming style, with minimum number of threads, avoiding
|
||||||
|
complicated dependency between threads.
|
||||||
|
|
||||||
|
|
||||||
|
@node Note (Use of sleep mode)
|
||||||
|
@chapter Note (Use of sleep mode)
|
||||||
|
|
||||||
Calling the chopstx_conf_idle function (> 0) to allow the idle thread
|
Calling the chopstx_conf_idle function (> 0) to allow the idle thread
|
||||||
going to sleep. MCU will be in sleep mode when no threads are
|
going to sleep. MCU will be in sleep mode when no threads are
|
||||||
|
|||||||
Reference in New Issue
Block a user