Removed some extraneous code in the io.c example in part 3

This commit is contained in:
Adam Greenwood-Byrne 2020-07-12 14:32:55 +01:00
parent ff4a2907b7
commit 4bdc708563
2 changed files with 2 additions and 10 deletions

View file

@ -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

View file

@ -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