mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Api Symbols: replace asserts with checks (#3507)
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
@@ -153,7 +153,7 @@ bool furi_hal_usb_set_config(FuriHalUsbInterface* new_if, void* ctx) {
|
||||
return return_data.bool_value;
|
||||
}
|
||||
|
||||
FuriHalUsbInterface* furi_hal_usb_get_config() {
|
||||
FuriHalUsbInterface* furi_hal_usb_get_config(void) {
|
||||
UsbApiEventReturnData return_data = {
|
||||
.void_value = NULL,
|
||||
};
|
||||
@@ -168,7 +168,7 @@ FuriHalUsbInterface* furi_hal_usb_get_config() {
|
||||
return return_data.void_value;
|
||||
}
|
||||
|
||||
void furi_hal_usb_lock() {
|
||||
void furi_hal_usb_lock(void) {
|
||||
UsbApiEventMessage msg = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = UsbApiEventTypeLock,
|
||||
@@ -177,7 +177,7 @@ void furi_hal_usb_lock() {
|
||||
furi_hal_usb_send_message(&msg);
|
||||
}
|
||||
|
||||
void furi_hal_usb_unlock() {
|
||||
void furi_hal_usb_unlock(void) {
|
||||
UsbApiEventMessage msg = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = UsbApiEventTypeUnlock,
|
||||
@@ -186,7 +186,7 @@ void furi_hal_usb_unlock() {
|
||||
furi_hal_usb_send_message(&msg);
|
||||
}
|
||||
|
||||
bool furi_hal_usb_is_locked() {
|
||||
bool furi_hal_usb_is_locked(void) {
|
||||
UsbApiEventReturnData return_data = {
|
||||
.bool_value = false,
|
||||
};
|
||||
@@ -201,7 +201,7 @@ bool furi_hal_usb_is_locked() {
|
||||
return return_data.bool_value;
|
||||
}
|
||||
|
||||
void furi_hal_usb_disable() {
|
||||
void furi_hal_usb_disable(void) {
|
||||
UsbApiEventMessage msg = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = UsbApiEventTypeDisable,
|
||||
@@ -210,7 +210,7 @@ void furi_hal_usb_disable() {
|
||||
furi_hal_usb_send_message(&msg);
|
||||
}
|
||||
|
||||
void furi_hal_usb_enable() {
|
||||
void furi_hal_usb_enable(void) {
|
||||
UsbApiEventMessage msg = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = UsbApiEventTypeEnable,
|
||||
@@ -219,7 +219,7 @@ void furi_hal_usb_enable() {
|
||||
furi_hal_usb_send_message(&msg);
|
||||
}
|
||||
|
||||
void furi_hal_usb_reinit() {
|
||||
void furi_hal_usb_reinit(void) {
|
||||
UsbApiEventMessage msg = {
|
||||
.lock = api_lock_alloc_locked(),
|
||||
.type = UsbApiEventTypeReinit,
|
||||
@@ -358,7 +358,7 @@ static void usb_process_mode_change(FuriHalUsbInterface* interface, void* contex
|
||||
}
|
||||
}
|
||||
|
||||
static void usb_process_mode_reinit() {
|
||||
static void usb_process_mode_reinit(void) {
|
||||
// Temporary disable callback to avoid getting false reset events
|
||||
usbd_reg_event(&udev, usbd_evt_reset, NULL);
|
||||
FURI_LOG_I(TAG, "USB Reinit");
|
||||
|
||||
Reference in New Issue
Block a user