8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c735dce commit 356b1a8Copy full SHA for 356b1a8
ports/litex/common-hal/microcontroller/Pin.c
@@ -41,12 +41,19 @@ void reset_pin_number(uint8_t pin_port, uint8_t pin_number) {
41
claimed_pins[pin_port] &= ~(1<<pin_number);
42
}
43
44
+void common_hal_reset_pin(const mcu_pin_obj_t* pin) {
45
+ reset_pin_number(0, pin->number);
46
+}
47
48
void claim_pin(const mcu_pin_obj_t* pin) {
49
// Set bit in claimed_pins bitmask.
50
claimed_pins[0] |= 1<<pin->number;
51
52
53
+void common_hal_mcu_pin_claim(const mcu_pin_obj_t* pin) {
54
+ claim_pin(pin);
55
56
+
57
bool pin_number_is_free(uint8_t pin_port, uint8_t pin_number) {
58
return !(claimed_pins[pin_port] & 1<<pin_number);
59
0 commit comments