2019-08-09 15:23:06 -04:00
|
|
|
/*************************************************************************
|
|
|
|
|
* Copyright (C) 2019 by Justin Byers
|
|
|
|
|
*
|
|
|
|
|
* This file is part of clubdance_v2.
|
|
|
|
|
*
|
|
|
|
|
* clubdance_v2 is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* clubdance_v2 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 General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with clubdance_v2. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
*************************************************************************/
|
|
|
|
|
/**
|
|
|
|
|
* @file padhal.h
|
|
|
|
|
* @author Justin Byers
|
|
|
|
|
* @date 6 Aug 2019
|
|
|
|
|
* @brief Simple abstraction layer to read the physical pad sensors.
|
|
|
|
|
*/
|
|
|
|
|
#ifndef PADHAL_H
|
|
|
|
|
#define PADHAL_H
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initialize IO for reading the pad sensors.
|
|
|
|
|
*/
|
2019-08-10 15:28:48 -04:00
|
|
|
void PADHAL_Initialize(void);
|
2019-08-09 15:23:06 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the current state of all pad sensors.
|
|
|
|
|
* @return the pad states, as the first 6 bits in a uint8_t.
|
|
|
|
|
*/
|
2019-08-10 15:28:48 -04:00
|
|
|
uint8_t PADHAL_GetButtons(void);
|
2019-08-09 15:23:06 -04:00
|
|
|
|
|
|
|
|
#endif /* PADHAL_H */
|
|
|
|
|
|