Fix duplicate newlines at the end of files

This commit is contained in:
Matthias Grob
2024-07-19 14:33:36 +02:00
parent 7f14110bb1
commit f2bca92221
274 changed files with 248 additions and 560 deletions
@@ -59,4 +59,3 @@ void px4_indicate_external_reset_lockout(LockoutComponent component, bool enable
void px4_indicate_external_reset_lockout(LockoutComponent component, bool enabled) {}
#endif /* BOARD_INDICATE_EXTERNAL_LOCKOUT_STATE */
@@ -53,6 +53,3 @@ enum class LockoutComponent : uint8_t {
* @param enabled true if compoment is in critical state
*/
void px4_indicate_external_reset_lockout(LockoutComponent component, bool enabled);
@@ -446,4 +446,3 @@ __END_DECLS
#define PX4_ANSI_COLOR_CYAN "\x1b[36m"
#define PX4_ANSI_COLOR_GRAY "\x1B[37m"
#define PX4_ANSI_COLOR_RESET "\x1b[0m"
-1
View File
@@ -238,4 +238,3 @@ void PRINT_MODULE_USAGE_ARG(const char *values, const char *description, bool is
#endif
}
-1
View File
@@ -254,4 +254,3 @@ typedef uint8_t main_state_t;
typedef uint8_t hil_state_t;
typedef uint8_t navigation_state_t;
typedef uint8_t switch_pos_t;
-1
View File
@@ -70,4 +70,3 @@ void dq_addlast(dq_entry_t *node, dq_queue_t *queue)
queue->tail = node;
}
}
-1
View File
@@ -78,4 +78,3 @@ void dq_rem(dq_entry_t *node, dq_queue_t *queue)
node->flink = NULL;
node->blink = NULL;
}
@@ -78,4 +78,3 @@ dq_entry_t *dq_remfirst(dq_queue_t *queue)
return ret;
}
-2
View File
@@ -91,5 +91,3 @@ void sq_addfirst(sq_entry_t *node, sq_queue_t *queue)
queue->head = node;
}
-1
View File
@@ -69,4 +69,3 @@ void sq_addlast(sq_entry_t *node, sq_queue_t *queue)
queue->tail = node;
}
}
@@ -73,4 +73,3 @@ sq_entry_t *sq_remfirst(sq_queue_t *queue)
return ret;
}
+237 -238
View File
@@ -3,21 +3,21 @@
* The Embedded Experts *
* www.segger.com *
**********************************************************************
File : jtrace_debug_ozone.jdebug
Created : 26 Oct 2020 14:30
Ozone Version : V3.20e
*/
/*********************************************************************
*
* OnProjectLoad
*
* Function description
* Project load routine. Required.
*
*
* OnProjectLoad
*
* Function description
* Project load routine. Required.
*
**********************************************************************
*/
*/
void OnProjectLoad (void) {
//
// Dialog-generated settings
@@ -38,291 +38,290 @@ void OnProjectLoad (void) {
}
/*********************************************************************
*
* OnStartupComplete
*
* Function description
* Called when program execution has reached/passed
* the startup completion point. Optional.
*
*
* OnStartupComplete
*
* Function description
* Called when program execution has reached/passed
* the startup completion point. Optional.
*
**********************************************************************
*/
//void OnStartupComplete (void) {
//}
*/
//void OnStartupComplete (void) {
//}
/*********************************************************************
*
* TargetReset
*
* Function description
* Replaces the default target device reset routine. Optional.
*
* Notes
* This example demonstrates the usage when
* debugging a RAM program on a Cortex-M target device
*
*
* TargetReset
*
* Function description
* Replaces the default target device reset routine. Optional.
*
* Notes
* This example demonstrates the usage when
* debugging a RAM program on a Cortex-M target device
*
**********************************************************************
*/
//void TargetReset (void) {
//
// unsigned int SP;
// unsigned int PC;
// unsigned int VectorTableAddr;
//
// VectorTableAddr = Program.GetBaseAddr();
//
// if (VectorTableAddr != 0xFFFFFFFF) {
// SP = Target.ReadU32(VectorTableAddr);
// Target.SetReg("SP", SP);
// } else {
// Util.Log("Project file error: failed to get program base");
// }
//
// PC = Elf.GetEntryPointPC();
//
// if (PC != 0xFFFFFFFF) {
// Target.SetReg("PC", PC);
// } else if (VectorTableAddr != 0xFFFFFFFF) {
// PC = Target.ReadU32(VectorTableAddr + 4);
// Target.SetReg("PC", PC);
//}
*/
//void TargetReset (void) {
//
// unsigned int SP;
// unsigned int PC;
// unsigned int VectorTableAddr;
//
// VectorTableAddr = Program.GetBaseAddr();
//
// if (VectorTableAddr != 0xFFFFFFFF) {
// SP = Target.ReadU32(VectorTableAddr);
// Target.SetReg("SP", SP);
// } else {
// Util.Log("Project file error: failed to get program base");
// }
//
// PC = Elf.GetEntryPointPC();
//
// if (PC != 0xFFFFFFFF) {
// Target.SetReg("PC", PC);
// } else if (VectorTableAddr != 0xFFFFFFFF) {
// PC = Target.ReadU32(VectorTableAddr + 4);
// Target.SetReg("PC", PC);
//}
/*********************************************************************
*
* BeforeTargetReset
*
* Function description
* Event handler routine. Optional.
*
*
* BeforeTargetReset
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
//void BeforeTargetReset (void) {
//}
*/
//void BeforeTargetReset (void) {
//}
/*********************************************************************
*
* AfterTargetReset
*
* Function description
* Event handler routine. Optional.
* - Sets the PC register to program reset value.
* - Sets the SP register to program reset value on Cortex-M.
*
*
* AfterTargetReset
*
* Function description
* Event handler routine. Optional.
* - Sets the PC register to program reset value.
* - Sets the SP register to program reset value on Cortex-M.
*
**********************************************************************
*/
*/
void AfterTargetReset (void) {
unsigned int SP;
unsigned int PC;
unsigned int VectorTableAddr;
VectorTableAddr = Elf.GetBaseAddr();
if (VectorTableAddr == 0xFFFFFFFF) {
Util.Log("Project file error: failed to get program base");
} else {
SP = Target.ReadU32(VectorTableAddr);
Target.SetReg("SP", SP);
PC = Target.ReadU32(VectorTableAddr + 4);
Target.SetReg("PC", PC);
unsigned int SP;
unsigned int PC;
unsigned int VectorTableAddr;
VectorTableAddr = Elf.GetBaseAddr();
if (VectorTableAddr == 0xFFFFFFFF) {
Util.Log("Project file error: failed to get program base");
} else {
SP = Target.ReadU32(VectorTableAddr);
Target.SetReg("SP", SP);
PC = Target.ReadU32(VectorTableAddr + 4);
Target.SetReg("PC", PC);
}
}
/*********************************************************************
*
* DebugStart
*
* Function description
* Replaces the default debug session startup routine. Optional.
*
*
* DebugStart
*
* Function description
* Replaces the default debug session startup routine. Optional.
*
**********************************************************************
*/
//void DebugStart (void) {
//}
*/
//void DebugStart (void) {
//}
/*********************************************************************
*
* TargetConnect
*
* Function description
* Replaces the default target IF connection routine. Optional.
*
*
* TargetConnect
*
* Function description
* Replaces the default target IF connection routine. Optional.
*
**********************************************************************
*/
//void TargetConnect (void) {
//}
*/
//void TargetConnect (void) {
//}
/*********************************************************************
*
* BeforeTargetConnect
*
* Function description
* Event handler routine. Optional.
*
*
* BeforeTargetConnect
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
void BeforeTargetConnect (void) {
*/
void BeforeTargetConnect (void) {
Project.SetJLinkScript("FMUv6_Trace.pex");
}
}
/*********************************************************************
*
* AfterTargetConnect
*
* Function description
* Event handler routine. Optional.
*
*
* AfterTargetConnect
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
//void AfterTargetConnect (void) {
//}
*/
//void AfterTargetConnect (void) {
//}
/*********************************************************************
*
* TargetDownload
*
* Function description
* Replaces the default program download routine. Optional.
*
*
* TargetDownload
*
* Function description
* Replaces the default program download routine. Optional.
*
**********************************************************************
*/
//void TargetDownload (void) {
//}
*/
//void TargetDownload (void) {
//}
/*********************************************************************
*
* BeforeTargetDownload
*
* Function description
* Event handler routine. Optional.
*
*
* BeforeTargetDownload
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
//void BeforeTargetDownload (void) {
//}
*/
//void BeforeTargetDownload (void) {
//}
/*********************************************************************
*
* AfterTargetDownload
*
* Function description
* Event handler routine. Optional.
* - Sets the PC register to program reset value.
* - Sets the SP register to program reset value on Cortex-M.
*
*
* AfterTargetDownload
*
* Function description
* Event handler routine. Optional.
* - Sets the PC register to program reset value.
* - Sets the SP register to program reset value on Cortex-M.
*
**********************************************************************
*/
*/
void AfterTargetDownload (void) {
unsigned int SP;
unsigned int PC;
unsigned int VectorTableAddr;
VectorTableAddr = Elf.GetBaseAddr();
Util.Log("___");
if (VectorTableAddr == 0xFFFFFFFF) {
Util.Log("Project file error: failed to get program base");
} else {
SP = Target.ReadU32(VectorTableAddr);
Target.SetReg("SP", SP);
PC = Target.ReadU32(VectorTableAddr + 4);
Target.SetReg("PC", PC);
unsigned int SP;
unsigned int PC;
unsigned int VectorTableAddr;
VectorTableAddr = Elf.GetBaseAddr();
Util.Log("___");
if (VectorTableAddr == 0xFFFFFFFF) {
Util.Log("Project file error: failed to get program base");
} else {
SP = Target.ReadU32(VectorTableAddr);
Target.SetReg("SP", SP);
PC = Target.ReadU32(VectorTableAddr + 4);
Target.SetReg("PC", PC);
}
}
/*********************************************************************
*
* BeforeTargetDisconnect
*
* Function description
* Event handler routine. Optional.
*
*
* BeforeTargetDisconnect
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
//void BeforeTargetDisconnect (void) {
//}
*/
//void BeforeTargetDisconnect (void) {
//}
/*********************************************************************
*
* AfterTargetDisconnect
*
* Function description
* Event handler routine. Optional.
*
*
* AfterTargetDisconnect
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
//void AfterTargetDisconnect (void) {
//}
*/
//void AfterTargetDisconnect (void) {
//}
/*********************************************************************
*
* AfterTargetHalt
*
* Function description
* Event handler routine. Optional.
*
*
* AfterTargetHalt
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
//void AfterTargetHalt (void) {
//}
*/
//void AfterTargetHalt (void) {
//}
/*********************************************************************
*
* BeforeTargetResume
*
* Function description
* Event handler routine. Optional.
*
*
* BeforeTargetResume
*
* Function description
* Event handler routine. Optional.
*
**********************************************************************
*/
//void BeforeTargetResume (void) {
//}
*/
//void BeforeTargetResume (void) {
//}
/*********************************************************************
*
* OnSnapshotLoad
*
* Function description
* Called upon loading a snapshot. Optional.
*
* Additional information
* This function is used to restore the target state in cases
* where values cannot simply be written to the target.
* Typical use: GPIO clock needs to be enabled, before
* GPIO is configured.
*
*
* OnSnapshotLoad
*
* Function description
* Called upon loading a snapshot. Optional.
*
* Additional information
* This function is used to restore the target state in cases
* where values cannot simply be written to the target.
* Typical use: GPIO clock needs to be enabled, before
* GPIO is configured.
*
**********************************************************************
*/
//void OnSnapshotLoad (void) {
//}
*/
//void OnSnapshotLoad (void) {
//}
/*********************************************************************
*
* OnSnapshotSave
*
* Function description
* Called upon saving a snapshot. Optional.
*
* Additional information
* This function is usually used to save values of the target
* state which can either not be trivially read,
* or need to be restored in a specific way or order.
* Typically use: Memory Mapped Registers,
* such as PLL and GPIO configuration.
*
*
* OnSnapshotSave
*
* Function description
* Called upon saving a snapshot. Optional.
*
* Additional information
* This function is usually used to save values of the target
* state which can either not be trivially read,
* or need to be restored in a specific way or order.
* Typically use: Memory Mapped Registers,
* such as PLL and GPIO configuration.
*
**********************************************************************
*/
//void OnSnapshotSave (void) {
//}
*/
//void OnSnapshotSave (void) {
//}
/*********************************************************************
*
* OnError
*
* Function description
* Called when an error ocurred. Optional.
*
*
* OnError
*
* Function description
* Called when an error ocurred. Optional.
*
**********************************************************************
*/
//void OnError (const char* sErrorMsg) {
//}
*/
//void OnError (const char* sErrorMsg) {
//}
-2
View File
@@ -32,6 +32,4 @@
############################################################################
add_subdirectory(common)
add_subdirectory(${PX4_CHIP_MANUFACTURER})
@@ -34,4 +34,3 @@ px4_add_library(platform_gpio_mcp23009
mcp23009.cpp
)
target_link_libraries(platform_gpio_mcp23009 PRIVATE drivers__device) # device::I2C
@@ -37,4 +37,3 @@
#else
# define SYSTEM_ADC_COUNT 2
#endif
@@ -54,4 +54,3 @@ __BEGIN_DECLS
#include <arch/board/board.h>
__END_DECLS
@@ -114,4 +114,3 @@ int board_get_px4_guid_formated(char *format_buffer, int size)
return offset;
}
@@ -31,6 +31,4 @@
#
############################################################################
add_subdirectory(${PX4_CHIP})
@@ -40,6 +40,3 @@ add_subdirectory(../kinetis/hrt hrt)
add_subdirectory(../kinetis/io_pins io_pins)
add_subdirectory(../kinetis/tone_alarm tone_alarm)
add_subdirectory(../kinetis/version version)
@@ -33,4 +33,3 @@
#pragma once
#include "../../../kinetis/include/px4_arch/adc.h"
@@ -32,6 +32,4 @@
****************************************************************************/
#pragma once
#include "../../../kinetis/include/px4_arch/io_timer.h"
@@ -35,4 +35,3 @@ px4_add_library(arch_hrt
hrt.c
)
target_compile_options(arch_hrt PRIVATE -Wno-cast-align) # TODO: fix and enable
@@ -37,5 +37,3 @@
#define SYSTEM_ADC_BASE 0 // not used on kinetis
#include <px4_platform/adc.h>
@@ -33,4 +33,3 @@
#pragma once
#include "../../../rpi_common/include/px4_arch/adc.h"
@@ -33,4 +33,3 @@
#pragma once
#include "../../../rpi_common/include/px4_arch/i2c_hw_description.h"
@@ -37,4 +37,3 @@
#define SYSTEM_ADC_BASE RP2040_ADC_BASE
#include <px4_platform/adc.h>
@@ -31,6 +31,4 @@
#
############################################################################
add_subdirectory(${PX4_CHIP})
@@ -54,4 +54,3 @@
#endif
#include <px4_platform/adc.h>
@@ -166,4 +166,3 @@ private:
*/
static uint8_t _io_buffer_storage[] px4_cache_aligned_data();
};
@@ -34,4 +34,3 @@
#define px4_stm32_dmasetup stm32_dmasetup
#include "../../../stm32_common/include/px4_arch/dshot.h"
@@ -32,6 +32,4 @@
****************************************************************************/
#pragma once
#include "../../../stm32_common/include/px4_arch/io_timer.h"
@@ -36,5 +36,3 @@ add_subdirectory(board_critmon)
add_subdirectory(../stm32_common/board_reset board_reset)
add_subdirectory(../stm32_common/version version)
add_subdirectory(../stm32_common/hrt hrt)
@@ -33,4 +33,3 @@
#pragma once
#include "../../../stm32_common/include/px4_arch/adc.h"
@@ -32,6 +32,4 @@
****************************************************************************/
#pragma once
#include "../../../stm32_common/include/px4_arch/io_timer.h"
@@ -52,4 +52,3 @@ __BEGIN_DECLS
#define PX4_ADC_INTERNAL_TEMP_SENSOR_CHANNEL 16
__END_DECLS
@@ -47,4 +47,3 @@ add_subdirectory(../stm32_common/version version)
add_subdirectory(px4io_serial)
add_subdirectory(watchdog)
@@ -33,4 +33,3 @@
#pragma once
#include "../../../stm32_common/include/px4_arch/adc.h"
@@ -35,4 +35,3 @@
#define px4_stm32_dmasetup stm32_dmasetup
#include "../../../stm32_common/include/px4_arch/dshot.h"
@@ -33,4 +33,3 @@
#pragma once
#include "../../../stm32_common/include/px4_arch/i2c_hw_description.h"
@@ -51,4 +51,3 @@ __BEGIN_DECLS
#define PX4_NUMBER_I2C_BUSES STM32_NI2C
#define PX4_ADC_INTERNAL_TEMP_SENSOR_CHANNEL 18
__END_DECLS
@@ -34,4 +34,3 @@
#pragma once
#include "../../../stm32_common/include/px4_arch/px4io_serial.h"
@@ -473,4 +473,3 @@ ArchPX4IOSerial::_abort_dma()
stm32_dmastop(_tx_dma);
stm32_dmastop(_rx_dma);
}
@@ -33,4 +33,3 @@
#pragma once
#include "../../../stm32_common/include/px4_arch/adc.h"
@@ -35,4 +35,3 @@
#define px4_stm32_dmasetup stm32_dmasetup
#include "../../../stm32_common/include/px4_arch/dshot.h"
@@ -32,6 +32,4 @@
****************************************************************************/
#pragma once
#include "../../../stm32_common/include/px4_arch/io_timer.h"
@@ -61,4 +61,3 @@ int stm32_flash_unlock(void);
int stm32_flash_writeprotect(size_t page, bool enabled);
__END_DECLS
@@ -34,4 +34,3 @@
#pragma once
#include "../../../stm32_common/include/px4_arch/px4io_serial.h"
@@ -506,4 +506,3 @@ ArchPX4IOSerial::_abort_dma()
rICR = rISR & rISR_ERR_FLAGS_MASK; /* clear the flags */
}
-1
View File
@@ -60,4 +60,3 @@ static inline void hrt_work_unlock(void)
}
__END_DECLS
-1
View File
@@ -131,4 +131,3 @@ EXTERN FAR dq_entry_t *dq_remfirst(dq_queue_t *queue);
#endif
#endif /* __INCLUDE_QUEUE_H_ */
-1
View File
@@ -34,4 +34,3 @@
add_subdirectory(common)
add_subdirectory(${PX4_CHIP_MANUFACTURER})
@@ -76,4 +76,3 @@ private:
std::atomic_int _components_used_bitset{0};
std::atomic_int _components_progress_bitset{0};
};
@@ -39,4 +39,3 @@ px4_add_library(px4_daemon
server_io.cpp
sock_protocol.cpp
)
@@ -85,4 +85,3 @@ private:
};
} // namespace px4_daemon
@@ -101,4 +101,3 @@ private:
};
} // namespace px4_daemon
@@ -103,4 +103,3 @@ private:
} // namespace px4_daemon
@@ -124,4 +124,3 @@ private:
} // namespace px4_daemon
@@ -48,4 +48,3 @@ std::string get_socket_path(int instance_id)
}
} // namespace px4_daemon
@@ -45,4 +45,3 @@ namespace px4_daemon
std::string get_socket_path(int instance_id);
} // namespace px4_daemon
@@ -97,4 +97,3 @@ void init(int argc, char *argv[], const char *app_name)
}
}
@@ -31,6 +31,4 @@
#
############################################################################
add_subdirectory(${PX4_CHIP})
@@ -31,6 +31,4 @@
#
############################################################################
add_subdirectory(tone_alarm)
@@ -33,4 +33,3 @@
#pragma once
#include <px4_platform/micro_hal.h>
@@ -58,4 +58,3 @@ void stop_note()
}
} /* namespace ToneAlarmInterface */
@@ -32,4 +32,3 @@
****************************************************************************/
// Placeholder
-1
View File
@@ -131,4 +131,3 @@ EXTERN FAR dq_entry_t *dq_remfirst(dq_queue_t *queue);
#endif
#endif /* __INCLUDE_QUEUE_H_ */
@@ -34,4 +34,3 @@
#pragma once
extern "C" float px4muorb_get_cpu_load(void);
-1
View File
@@ -61,4 +61,3 @@ static inline void hrt_work_unlock()
}
__END_DECLS
-1
View File
@@ -131,4 +131,3 @@ EXTERN FAR dq_entry_t *dq_remfirst(dq_queue_t *queue);
#endif
#endif /* __INCLUDE_QUEUE_H_ */
-1
View File
@@ -34,4 +34,3 @@
add_subdirectory(common)
add_subdirectory(${PX4_CHIP_MANUFACTURER})
@@ -33,4 +33,3 @@
#pragma once
#include <px4_platform/micro_hal.h>