always break rule (#154)

This commit is contained in:
coreglitch
2020-10-02 09:32:11 +03:00
committed by GitHub
parent 12e319e6d9
commit ed76f702b1
14 changed files with 135 additions and 120 deletions

View File

@@ -73,12 +73,13 @@ bool furi_create(const char* name, void* value, size_t size) {
return true;
}
FuriRecordSubscriber* furi_open(const char* name,
bool solo,
bool no_mute,
FlipperRecordCallback value_callback,
FlipperRecordStateCallback state_callback,
void* ctx) {
FuriRecordSubscriber* furi_open(
const char* name,
bool solo,
bool no_mute,
FlipperRecordCallback value_callback,
FlipperRecordStateCallback state_callback,
void* ctx) {
#ifdef FURI_DEBUG
printf("[FURI] opening %s record\n", name);
#endif
@@ -233,9 +234,10 @@ bool furi_write(FuriRecordSubscriber* handler, const void* value, size_t size) {
if(handler == NULL || handler->record == NULL || value == NULL) {
#ifdef FURI_DEBUG
printf("[FURI] write: null param %x %x\n",
(uint32_t)(size_t)handler,
(uint32_t)(size_t)value);
printf(
"[FURI] write: null param %x %x\n",
(uint32_t)(size_t)handler,
(uint32_t)(size_t)value);
#endif
return false;

View File

@@ -109,12 +109,13 @@ When appication has exited or record has closed, all handlers is unmuted.
It may be useful for concurrently acces to resources like framebuffer or beeper.
\param[in] no_mute if true, another applications cannot mute this handler.
*/
FuriRecordSubscriber* furi_open(const char* name,
bool solo,
bool no_mute,
FlipperRecordCallback value_callback,
FlipperRecordStateCallback state_callback,
void* ctx);
FuriRecordSubscriber* furi_open(
const char* name,
bool solo,
bool no_mute,
FlipperRecordCallback value_callback,
FlipperRecordStateCallback state_callback,
void* ctx);
/*!

View File

@@ -44,14 +44,14 @@ FuriApp* furiac_start(FlipperApplication app, const char* name, void* param) {
}
// create task on static stack memory
task_buffer[current_buffer_idx].handler =
xTaskCreateStatic((TaskFunction_t)app,
(const char* const)name,
DEFAULT_STACK_SIZE / 4, // freertos specify stack size in words
(void* const)param,
tskIDLE_PRIORITY + 3, // normal priority
stack_buffer[current_buffer_idx],
&task_info_buffer[current_buffer_idx]);
task_buffer[current_buffer_idx].handler = xTaskCreateStatic(
(TaskFunction_t)app,
(const char* const)name,
DEFAULT_STACK_SIZE / 4, // freertos specify stack size in words
(void* const)param,
tskIDLE_PRIORITY + 3, // normal priority
stack_buffer[current_buffer_idx],
&task_info_buffer[current_buffer_idx]);
// save task
task_buffer[current_buffer_idx].application = app;

View File

@@ -41,14 +41,15 @@ bool register_tty_uart() {
return false;
}
FILE* fp = fopencookie(NULL,
"w",
(cookie_io_functions_t){
.read = NULL,
.write = stdout_write,
.seek = NULL,
.close = NULL,
});
FILE* fp = fopencookie(
NULL,
"w",
(cookie_io_functions_t){
.read = NULL,
.write = stdout_write,
.seek = NULL,
.close = NULL,
});
setvbuf(fp, NULL, _IONBF, 0);
stdout = fp;