/* * Copyright (C) 2023 Daniele Lacamera * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #ifndef ADC_H_INCLUDED #define ADC_H_INCLUDED #define POTL_PIN 0 #define POTL_CHANNEL 0 #define POTR_PIN 6 #define POTR_CHANNEL 4 #define JOYX_PIN 9 #define JOYX_CHANNEL 7 #define JOYY_PIN 8 #define JOYY_CHANNEL 6 int adc_init(void); int adc_read(void); void pot_read(uint32_t *potl, uint32_t *potr); void joy_read(uint32_t *joy_x, uint32_t *joy_y); #endif