mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Renaming resourceOwner_t to resourceOwner_e
This commit is contained in:
parent
dc5b0a64bd
commit
eb53cbb40d
4 changed files with 10 additions and 10 deletions
|
@ -231,7 +231,7 @@ void IOToggle(IO_t io)
|
|||
}
|
||||
|
||||
// claim IO pin, set owner and resources
|
||||
void IOInit(IO_t io, resourceOwner_t owner, resourceType_t resource, uint8_t index)
|
||||
void IOInit(IO_t io, resourceOwner_e owner, resourceType_e resource, uint8_t index)
|
||||
{
|
||||
ioRec_t *ioRec = IO_Rec(io);
|
||||
ioRec->owner = owner;
|
||||
|
@ -245,13 +245,13 @@ void IORelease(IO_t io)
|
|||
ioRec->owner = OWNER_FREE;
|
||||
}
|
||||
|
||||
resourceOwner_t IOGetOwner(IO_t io)
|
||||
resourceOwner_e IOGetOwner(IO_t io)
|
||||
{
|
||||
ioRec_t *ioRec = IO_Rec(io);
|
||||
return ioRec->owner;
|
||||
}
|
||||
|
||||
resourceType_t IOGetResource(IO_t io)
|
||||
resourceType_e IOGetResource(IO_t io)
|
||||
{
|
||||
ioRec_t *ioRec = IO_Rec(io);
|
||||
return ioRec->resource;
|
||||
|
|
|
@ -84,10 +84,10 @@ void IOHi(IO_t io);
|
|||
void IOLo(IO_t io);
|
||||
void IOToggle(IO_t io);
|
||||
|
||||
void IOInit(IO_t io, resourceOwner_t owner, resourceType_t resource, uint8_t index);
|
||||
void IOInit(IO_t io, resourceOwner_e owner, resourceType_e resource, uint8_t index);
|
||||
void IORelease(IO_t io); // unimplemented
|
||||
resourceOwner_t IOGetOwner(IO_t io);
|
||||
resourceType_t IOGetResources(IO_t io);
|
||||
resourceOwner_e IOGetOwner(IO_t io);
|
||||
resourceType_e IOGetResources(IO_t io);
|
||||
IO_t IOGetByTag(ioTag_t tag);
|
||||
|
||||
void IOConfigGPIO(IO_t io, ioConfig_t cfg);
|
||||
|
|
|
@ -11,8 +11,8 @@ typedef struct ioDef_s {
|
|||
typedef struct ioRec_s {
|
||||
GPIO_TypeDef *gpio;
|
||||
uint16_t pin;
|
||||
resourceOwner_t owner;
|
||||
resourceType_t resource;
|
||||
resourceOwner_e owner;
|
||||
resourceType_e resource;
|
||||
uint8_t index;
|
||||
} ioRec_t;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef enum {
|
|||
OWNER_SOFTSPI,
|
||||
OWNER_RX_SPI,
|
||||
OWNER_TOTAL_COUNT
|
||||
} resourceOwner_t;
|
||||
} resourceOwner_e;
|
||||
|
||||
extern const char * const ownerNames[OWNER_TOTAL_COUNT];
|
||||
|
||||
|
@ -51,6 +51,6 @@ typedef enum {
|
|||
RESOURCE_ADC_BATTERY, RESOURCE_ADC_RSSI, RESOURCE_ADC_EXTERNAL1, RESOURCE_ADC_CURRENT,
|
||||
RESOURCE_RX_CE,
|
||||
RESOURCE_TOTAL_COUNT
|
||||
} resourceType_t;
|
||||
} resourceType_e;
|
||||
|
||||
extern const char * const resourceNames[RESOURCE_TOTAL_COUNT];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue