mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-08 19:30:39 +00:00
Removed some extraneous code in the io.c example in part 3
This commit is contained in:
parent
ff4a2907b7
commit
4bdc708563
2 changed files with 2 additions and 10 deletions
|
@ -148,13 +148,9 @@ unsigned int gpio_clear (unsigned int pin_number, unsigned int value) { return
|
|||
unsigned int gpio_pull (unsigned int pin_number, unsigned int value) { return gpio_call(pin_number, value, GPPUPPDN0, 2, GPIO_MAX_PIN); }
|
||||
unsigned int gpio_function(unsigned int pin_number, unsigned int value) { return gpio_call(pin_number, value, GPFSEL0, 3, GPIO_MAX_PIN); }
|
||||
|
||||
void gpio_setPinFunction(unsigned int pin_number, unsigned int function) {
|
||||
gpio_function(pin_number, function);
|
||||
}
|
||||
|
||||
void gpio_useAsAlt5(unsigned int pin_number) {
|
||||
gpio_pull(pin_number, Pull_None);
|
||||
gpio_setPinFunction(pin_number, GPIO_FUNCTION_ALT5);
|
||||
gpio_function(pin_number, GPIO_FUNCTION_ALT5);
|
||||
}
|
||||
|
||||
// UART
|
||||
|
|
|
@ -43,13 +43,9 @@ unsigned int gpio_clear (unsigned int pin_number, unsigned int value) { return
|
|||
unsigned int gpio_pull (unsigned int pin_number, unsigned int value) { return gpio_call(pin_number, value, GPPUPPDN0, 2, GPIO_MAX_PIN); }
|
||||
unsigned int gpio_function(unsigned int pin_number, unsigned int value) { return gpio_call(pin_number, value, GPFSEL0, 3, GPIO_MAX_PIN); }
|
||||
|
||||
void gpio_setPinFunction(unsigned int pin_number, unsigned int function) {
|
||||
gpio_function(pin_number, function);
|
||||
}
|
||||
|
||||
void gpio_useAsAlt5(unsigned int pin_number) {
|
||||
gpio_pull(pin_number, Pull_None);
|
||||
gpio_setPinFunction(pin_number, GPIO_FUNCTION_ALT5);
|
||||
gpio_function(pin_number, GPIO_FUNCTION_ALT5);
|
||||
}
|
||||
|
||||
// UART
|
||||
|
|
Loading…
Reference in a new issue