File wiring_private.c
File List > arduino > src > wiring > wiring_private.c
Go to the documentation of this file.
/* Copyright (c) Kuba Szczodrzyński 2023-05-24. */
#include "wiring_private.h"
#if __has_include(<wiring_data.h>)
PinData *pinData(PinInfo *pin) {
if (pin->data == NULL) {
pin->data = calloc(1, sizeof(PinData));
}
return (PinData *)pin->data;
}
void pinRemoveData(PinInfo *pin) {
if (pin->data != NULL) {
free(pin->data);
}
pin->data = NULL;
}
#endif