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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 135 additions and 120 deletions

View File

@ -1,5 +1,5 @@
AccessModifierOffset: -4 AccessModifierOffset: -4
AlignAfterOpenBracket: Align AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left AlignEscapedNewlines: Left

View File

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

View File

@ -109,7 +109,8 @@ 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. 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. \param[in] no_mute if true, another applications cannot mute this handler.
*/ */
FuriRecordSubscriber* furi_open(const char* name, FuriRecordSubscriber* furi_open(
const char* name,
bool solo, bool solo,
bool no_mute, bool no_mute,
FlipperRecordCallback value_callback, FlipperRecordCallback value_callback,

View File

@ -44,8 +44,8 @@ FuriApp* furiac_start(FlipperApplication app, const char* name, void* param) {
} }
// create task on static stack memory // create task on static stack memory
task_buffer[current_buffer_idx].handler = task_buffer[current_buffer_idx].handler = xTaskCreateStatic(
xTaskCreateStatic((TaskFunction_t)app, (TaskFunction_t)app,
(const char* const)name, (const char* const)name,
DEFAULT_STACK_SIZE / 4, // freertos specify stack size in words DEFAULT_STACK_SIZE / 4, // freertos specify stack size in words
(void* const)param, (void* const)param,

View File

@ -41,7 +41,8 @@ bool register_tty_uart() {
return false; return false;
} }
FILE* fp = fopencookie(NULL, FILE* fp = fopencookie(
NULL,
"w", "w",
(cookie_io_functions_t){ (cookie_io_functions_t){
.read = NULL, .read = NULL,

View File

@ -55,12 +55,14 @@
/* USER CODE END FunctionPrototypes */ /* USER CODE END FunctionPrototypes */
/* GetIdleTaskMemory prototype (linked to static allocation support) */ /* GetIdleTaskMemory prototype (linked to static allocation support) */
void vApplicationGetIdleTaskMemory(StaticTask_t** ppxIdleTaskTCBBuffer, void vApplicationGetIdleTaskMemory(
StaticTask_t** ppxIdleTaskTCBBuffer,
StackType_t** ppxIdleTaskStackBuffer, StackType_t** ppxIdleTaskStackBuffer,
uint32_t* pulIdleTaskStackSize); uint32_t* pulIdleTaskStackSize);
/* GetTimerTaskMemory prototype (linked to static allocation support) */ /* GetTimerTaskMemory prototype (linked to static allocation support) */
void vApplicationGetTimerTaskMemory(StaticTask_t** ppxTimerTaskTCBBuffer, void vApplicationGetTimerTaskMemory(
StaticTask_t** ppxTimerTaskTCBBuffer,
StackType_t** ppxTimerTaskStackBuffer, StackType_t** ppxTimerTaskStackBuffer,
uint32_t* pulTimerTaskStackSize); uint32_t* pulTimerTaskStackSize);
@ -85,7 +87,8 @@ __weak void vApplicationIdleHook(void) {
static StaticTask_t xIdleTaskTCBBuffer; static StaticTask_t xIdleTaskTCBBuffer;
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE]; static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
void vApplicationGetIdleTaskMemory(StaticTask_t** ppxIdleTaskTCBBuffer, void vApplicationGetIdleTaskMemory(
StaticTask_t** ppxIdleTaskTCBBuffer,
StackType_t** ppxIdleTaskStackBuffer, StackType_t** ppxIdleTaskStackBuffer,
uint32_t* pulIdleTaskStackSize) { uint32_t* pulIdleTaskStackSize) {
*ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer; *ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
@ -99,7 +102,8 @@ void vApplicationGetIdleTaskMemory(StaticTask_t** ppxIdleTaskTCBBuffer,
static StaticTask_t xTimerTaskTCBBuffer; static StaticTask_t xTimerTaskTCBBuffer;
static StackType_t xTimerStack[configTIMER_TASK_STACK_DEPTH]; static StackType_t xTimerStack[configTIMER_TASK_STACK_DEPTH];
void vApplicationGetTimerTaskMemory(StaticTask_t** ppxTimerTaskTCBBuffer, void vApplicationGetTimerTaskMemory(
StaticTask_t** ppxTimerTaskTCBBuffer,
StackType_t** ppxTimerTaskStackBuffer, StackType_t** ppxTimerTaskStackBuffer,
uint32_t* pulTimerTaskStackSize) { uint32_t* pulTimerTaskStackSize) {
*ppxTimerTaskTCBBuffer = &xTimerTaskTCBBuffer; *ppxTimerTaskTCBBuffer = &xTimerTaskTCBBuffer;

View File

@ -154,7 +154,8 @@ uint32_t SystemCoreClock = 4000000U;
const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U};
const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U};
const uint32_t MSIRangeTable[12] = {100000U, const uint32_t MSIRangeTable[12] = {
100000U,
200000U, 200000U,
400000U, 400000U,
800000U, 800000U,

View File

@ -139,10 +139,8 @@ static int8_t CDC_Receive_FS(uint8_t* pbuf, uint32_t* Len);
* @} * @}
*/ */
USBD_CDC_ItfTypeDef USBD_Interface_fops_FS = {CDC_Init_FS, USBD_CDC_ItfTypeDef USBD_Interface_fops_FS =
CDC_DeInit_FS, {CDC_Init_FS, CDC_DeInit_FS, CDC_Control_FS, CDC_Receive_FS};
CDC_Control_FS,
CDC_Receive_FS};
/* Private functions ---------------------------------------------------------*/ /* Private functions ---------------------------------------------------------*/
/** /**

View File

@ -135,7 +135,8 @@ uint8_t* USBD_FS_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t* length);
* @{ * @{
*/ */
USBD_DescriptorsTypeDef FS_Desc = {USBD_FS_DeviceDescriptor, USBD_DescriptorsTypeDef FS_Desc = {
USBD_FS_DeviceDescriptor,
USBD_FS_LangIDStrDescriptor, USBD_FS_LangIDStrDescriptor,
USBD_FS_ManufacturerStrDescriptor, USBD_FS_ManufacturerStrDescriptor,
USBD_FS_ProductStrDescriptor, USBD_FS_ProductStrDescriptor,

View File

@ -55,12 +55,14 @@
/* USER CODE END FunctionPrototypes */ /* USER CODE END FunctionPrototypes */
/* GetIdleTaskMemory prototype (linked to static allocation support) */ /* GetIdleTaskMemory prototype (linked to static allocation support) */
void vApplicationGetIdleTaskMemory(StaticTask_t** ppxIdleTaskTCBBuffer, void vApplicationGetIdleTaskMemory(
StaticTask_t** ppxIdleTaskTCBBuffer,
StackType_t** ppxIdleTaskStackBuffer, StackType_t** ppxIdleTaskStackBuffer,
uint32_t* pulIdleTaskStackSize); uint32_t* pulIdleTaskStackSize);
/* GetTimerTaskMemory prototype (linked to static allocation support) */ /* GetTimerTaskMemory prototype (linked to static allocation support) */
void vApplicationGetTimerTaskMemory(StaticTask_t** ppxTimerTaskTCBBuffer, void vApplicationGetTimerTaskMemory(
StaticTask_t** ppxTimerTaskTCBBuffer,
StackType_t** ppxTimerTaskStackBuffer, StackType_t** ppxTimerTaskStackBuffer,
uint32_t* pulTimerTaskStackSize); uint32_t* pulTimerTaskStackSize);
@ -85,7 +87,8 @@ __weak void vApplicationIdleHook(void) {
static StaticTask_t xIdleTaskTCBBuffer; static StaticTask_t xIdleTaskTCBBuffer;
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE]; static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
void vApplicationGetIdleTaskMemory(StaticTask_t** ppxIdleTaskTCBBuffer, void vApplicationGetIdleTaskMemory(
StaticTask_t** ppxIdleTaskTCBBuffer,
StackType_t** ppxIdleTaskStackBuffer, StackType_t** ppxIdleTaskStackBuffer,
uint32_t* pulIdleTaskStackSize) { uint32_t* pulIdleTaskStackSize) {
*ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer; *ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
@ -99,7 +102,8 @@ void vApplicationGetIdleTaskMemory(StaticTask_t** ppxIdleTaskTCBBuffer,
static StaticTask_t xTimerTaskTCBBuffer; static StaticTask_t xTimerTaskTCBBuffer;
static StackType_t xTimerStack[configTIMER_TASK_STACK_DEPTH]; static StackType_t xTimerStack[configTIMER_TASK_STACK_DEPTH];
void vApplicationGetTimerTaskMemory(StaticTask_t** ppxTimerTaskTCBBuffer, void vApplicationGetTimerTaskMemory(
StaticTask_t** ppxTimerTaskTCBBuffer,
StackType_t** ppxTimerTaskStackBuffer, StackType_t** ppxTimerTaskStackBuffer,
uint32_t* pulTimerTaskStackSize) { uint32_t* pulTimerTaskStackSize) {
*ppxTimerTaskTCBBuffer = &xTimerTaskTCBBuffer; *ppxTimerTaskTCBBuffer = &xTimerTaskTCBBuffer;

View File

@ -156,7 +156,8 @@ uint32_t SystemCoreClock = 4000000U;
const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U}; const uint8_t AHBPrescTable[16] = {0U, 0U, 0U, 0U, 0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U, 6U, 7U, 8U, 9U};
const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U};
const uint32_t MSIRangeTable[12] = {100000U, const uint32_t MSIRangeTable[12] = {
100000U,
200000U, 200000U,
400000U, 400000U,
800000U, 800000U,

View File

@ -139,10 +139,8 @@ static int8_t CDC_Receive_FS(uint8_t* pbuf, uint32_t* Len);
* @} * @}
*/ */
USBD_CDC_ItfTypeDef USBD_Interface_fops_FS = {CDC_Init_FS, USBD_CDC_ItfTypeDef USBD_Interface_fops_FS =
CDC_DeInit_FS, {CDC_Init_FS, CDC_DeInit_FS, CDC_Control_FS, CDC_Receive_FS};
CDC_Control_FS,
CDC_Receive_FS};
/* Private functions ---------------------------------------------------------*/ /* Private functions ---------------------------------------------------------*/
/** /**

View File

@ -135,7 +135,8 @@ uint8_t* USBD_FS_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t* length);
* @{ * @{
*/ */
USBD_DescriptorsTypeDef FS_Desc = {USBD_FS_DeviceDescriptor, USBD_DescriptorsTypeDef FS_Desc = {
USBD_FS_DeviceDescriptor,
USBD_FS_LangIDStrDescriptor, USBD_FS_LangIDStrDescriptor,
USBD_FS_ManufacturerStrDescriptor, USBD_FS_ManufacturerStrDescriptor,
USBD_FS_ProductStrDescriptor, USBD_FS_ProductStrDescriptor,

View File

@ -30,7 +30,8 @@ void* pthread_wrapper(void* p) {
return NULL; return NULL;
} }
TaskHandle_t xTaskCreateStatic(TaskFunction_t pxTaskCode, TaskHandle_t xTaskCreateStatic(
TaskFunction_t pxTaskCode,
const char* const pcName, const char* const pcName,
const uint32_t ulStackDepth, const uint32_t ulStackDepth,
void* const pvParameters, void* const pvParameters,
@ -93,7 +94,8 @@ BaseType_t xQueueReceive(QueueHandle_t xQueue, void* pvBuffer, TickType_t xTicks
static uint32_t queue_global_id = 0; static uint32_t queue_global_id = 0;
QueueHandle_t xQueueCreateStatic(UBaseType_t uxQueueLength, QueueHandle_t xQueueCreateStatic(
UBaseType_t uxQueueLength,
UBaseType_t uxItemSize, UBaseType_t uxItemSize,
uint8_t* pucQueueStorageBuffer, uint8_t* pucQueueStorageBuffer,
StaticQueue_t* pxQueueBuffer) { StaticQueue_t* pxQueueBuffer) {
@ -108,7 +110,8 @@ QueueHandle_t xQueueCreateStatic(UBaseType_t uxQueueLength,
return (QueueHandle_t)msgid; return (QueueHandle_t)msgid;
} }
SemaphoreHandle_t xSemaphoreCreateCountingStatic(UBaseType_t uxMaxCount, SemaphoreHandle_t xSemaphoreCreateCountingStatic(
UBaseType_t uxMaxCount,
UBaseType_t uxInitialCount, UBaseType_t uxInitialCount,
StaticSemaphore_t* pxSemaphoreBuffer) { StaticSemaphore_t* pxSemaphoreBuffer) {
pxSemaphoreBuffer->type = SemaphoreTypeCounting; pxSemaphoreBuffer->type = SemaphoreTypeCounting;