Commit Graph

28 Commits

Author SHA1 Message Date
Lefucjusz
8a25c9e1d2 [BH-2001] Fix debug build with new FSL
* Fixed some issues that have been
caught by asserts in debug build.
* Minor cleanup.
2024-06-04 11:02:17 +02:00
Lukasz Mastalerz
f7ad63c951 [BH-1412] Fix services dependencies
Changes in dependecy managment
Replacing state flags with states in ServiceGUI
Unifying some parts of code
2023-08-01 17:22:48 +02:00
Lukasz Mastalerz
4c661d4f2c [BH-1412] Improve system shutdown procedure
Changed default Worker join timeout to a more realistic value
 in case of system shutdown procedure.
2023-08-01 16:06:25 +02:00
Lefucjusz
783ebcbb6c [MOS-183] Fix RT1051 debug build
Fix of multiple issues that resulted
in debug build failing.
2023-06-14 13:12:50 +02:00
Dawid Wojtas
8c2b5aa7b0 [BH-1624] Fix shutdown procedure
In some cases, the system wasn't able to turn off
because the GUI service got stuck. The device
was still working in the background. The cause
was an empty queue in DrawCommandQueue which
hang the GUI worker.

The interface was modified and synchronization
mechanism was removed.
The thread no longer waits in dequeue().

Also changed the worker to close in the right
way the logger worker.
2023-03-06 21:47:11 +01:00
Lefucjusz
d28fdb6594 [MOS-882] Fix FLAC file playback with USB cable connected
Fix of the issue that caused system crash when
trying to play 96kHz FLAC file with USB cable
connected. The reason of the issue was the lack
of FreeRTOS heap space left, what caused
pvPortMalloc() to fail when allocating
memory for stream buffer.

Additionally minor code cleanup.
2023-01-20 10:50:06 +01:00
Mateusz Piesta
2f42cd5e73 [BH-1424] FreeRTOS update
Updated FreeRTOS source code to 10.4.6.
Moved FreeRTOS sources to the third-party directory.
Added necessary changes to the CMake configuration.
Split FreeRTOSConfig.h. From now, each board has its own.
Added missing log headers.
Minor refactor of the module-os cmake.
Fixed stack overflows in bell application main and time service.
2022-04-07 13:31:28 +02:00
Marcin Smoczyński
958ce4906c [BH-897] Split module-sys
Split system module to better manage dependencies between system
components.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-21 16:11:59 +02:00
Marcin Smoczyński
4eadff48fe [EGD-5911] Allow configuring worker stack size
Allow configuring stack size of a worker by a child class for a better
system heap utilization control.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-03-04 12:06:49 +01:00
Marcin Smoczyński
40bf381eca [EGD-5086] Fix voice not starting when calling
Due to a race condition between source and sink voice is not always
starting when calling. Introduce audio stream connections to avoid
race condition and improve handling of audio start and stop operations.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-01-14 11:03:47 +01:00
Hubert Chrzaniuk
8a3eb64662 [EGD-4899] Worker class design improvements and fixes (#1190)
* allow workers to run independently from service
* change worker to use FreeRTOS wrapper Queue class instead of
  freeRTOS native queues
* fix bug disallowing to destruct worker that have never ran
* fixed worker bad state transition to Running state
2020-12-14 11:56:29 +01:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
Marcin Smoczyński
c74e7577c7 [EGD-3457] sys: improve workers destroying (#753)
Implement termination of worker threads. To achieve the goal so called
control queue has been introduced which is handled in Worker base class.
Once worker thread receives stop message it tries to kill itself. It is
possible to join a worker thread before deinit know thanks to a
semaphore given before thread termination.

Some improvements to the interface and implementation has been made
including state sanity checks. It is assumed that only service that owns
the worker is allowed to stop it, which allows not to consider code
reentrancy.

Worker destroying procedure has been updated in services that already
own workers.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2020-09-30 15:24:57 +02:00
alek
f146723e04 some style and spelling fixes 2020-07-23 23:02:05 +02:00
Radoslaw Wicik
a8573a404c Apply new style 2020-03-17 10:03:16 +01:00
pawel-mudita
d1665ed3ba [EGD-2855][EGD-2856] Parser for desktop app (#188)
* [EGD-2306] DESKTOP application initial commit

most of this code is foreign and unverified
it's low level magic numbers for the platform

on Linux i used PTY to simulate a serial line

* [EGD-2306] Add contact-list and contact-count commands

* [EGD-2306] Add command for geting contact by id and minor fixes

* [EGD-2856][WIP] Add basic serial parser

* [EGD-2855] Set usb device config buffer property cacheable

* [EGD-2856] Separate handlers from fsms, add status codes

* [EGD-2855] fd passed to state machine for linux renderer support

* [EGD-2856] Fix warnings

* [EGD-2855] New send task added and buffer queque

* [EGD-2856] Add simple ServiceDesktop documentation

* [EGD-2855] rt1051 worker refactor

* [EGD-2855] Added service workers for desktop app.
Changed linux USB driver mock up.
Added queue name mapping for service workers.
Added queue registry support (maybe redundant with mapping)

* [EGD-2855] Added proper message pointer to queue send and memory free
Added bsp driver namespace for linux and rt1051

* [EGD-2856] Major cleanup

* [EGD-2856] Fix typo

* [EGD-2856] Fix warnings

* [EGD-2856] Delete recursive fsm calling to prevent stack overflow

* [EGD-2856] Reduce http codes

* [EGD-2856] Rename serial parser to parser

* [EGD-2855] USB_CDC drives renames and cleanups
Service Worker queue cleanups

* [EGD-2855] Service Worker queue cleanups

* [EGD2855] Fixed external driver import

* [EGD-2856] Remove redundant message type

* [EGD-2856] Switch on enums instead of ints, and other minor changes requested after code review

* [EGD-2855] usb driver moved to bsp directory structure, pull request fixes

* [EGD-2855] clang #include fix

* [EGD-2856] Add tinyfsm as git submodule, update readme and minor fix

Co-authored-by: rkubiak01 <56821808+rkubiak01@users.noreply.github.com>
Co-authored-by: PrzeBrudny <60609703+PrzeBrudny@users.noreply.github.com>
2020-02-27 15:34:42 +01:00
Przemyslaw Brudny
5955c358e6 Service Worker queue cleanups 2020-02-24 12:28:02 +01:00
Przemyslaw Brudny
c54e56f6ba service worker queue name map and global queue registry added 2020-02-24 12:28:02 +01:00
Adam Dobrowolski
5407355177 [EGD-2508] Pre PR cleanup 2020-01-22 08:26:20 +01:00
Adam Dobrowolski
956068e1a3 [EGD-2508] test_harness sending keypresses ok, system start detection ok 2020-01-22 08:26:20 +01:00
Adam Dobrowolski
906b0951ec [EGD-2508] [WIP] test_harness: sending keypress works ok 2020-01-22 08:26:20 +01:00
Adam Dobrowolski
8c2622b2c2 Bluetooth compiles and starts on Purephone and Linux fine 2019-10-14 15:32:06 +02:00
Mateusz
86d32793c7 Fix: WorkerEvent and Worker deinit procedure 2019-08-27 07:51:28 +02:00
Kuba
24b40170b0 Unused code romoved. 2019-07-26 12:19:22 +02:00
Mateusz
5a6f32dae1 Turned on exceptions on Linux build
Bug fix
2019-07-15 15:15:16 +02:00
Robert Borzecki
1e34c1b07d Memory access problem. 2019-06-12 10:44:33 +02:00
Robert Borzecki
f9df91380d Added template of Service's worker. 2019-05-31 09:04:56 +02:00
Robert Borzecki
b1d018250f Added service worker. 2019-05-30 14:13:57 +02:00