mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Merge pull request #10947 from mikeller/fix_non_portable_code
This commit is contained in:
commit
22da87d471
1 changed files with 6 additions and 9 deletions
|
@ -33,17 +33,14 @@ typedef struct dbgPinState_s {
|
|||
uint32_t resetBSRR;
|
||||
} dbgPinState_t;
|
||||
|
||||
#ifndef DEBUG_PIN_COUNT
|
||||
#define DEBUG_PIN_COUNT 1
|
||||
#endif
|
||||
|
||||
// Provide a non-weak reference in target.c or elsewhere
|
||||
__weak dbgPin_t dbgPins[DEBUG_PIN_COUNT] = {
|
||||
{ .tag = IO_TAG(NONE) },
|
||||
};
|
||||
|
||||
dbgPinState_t dbgPinStates[DEBUG_PIN_COUNT] = { 0 };
|
||||
|
||||
extern dbgPin_t dbgPins[DEBUG_PIN_COUNT];
|
||||
// Define this in the target definition as (and set DEBUG_PIN_COUNT to the correct value):
|
||||
// dbgPin_t dbgPins[DEBUG_PIN_COUNT] = {
|
||||
// { .tag = IO_TAG(<pin>) },
|
||||
// };
|
||||
|
||||
void dbgPinInit(void)
|
||||
{
|
||||
for (unsigned i = 0; i < ARRAYLEN(dbgPins); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue