Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
349 lines (259 sloc) 8.97 KB
/*
* This file is part of the LibreRVAC project
*
* Copyright © 2015-2016
* Aleks-Daniel Jakimenko-Aleksejev <alex.jakimenko@gmail.com>
*
* This program 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.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
//#include "gpio.h"
// TODO finish reorganizing!
// INPUTS
#define PIN_BUMPER_SWITCH_LEFT_PORT G
#define PIN_BUMPER_SWITCH_LEFT_PIN 9
#define PIN_BUMPER_SWITCH_LEFT_ACTIVE LOW
#define PIN_BUMPER_SWITCH_RIGHT_PORT G
#define PIN_BUMPER_SWITCH_RIGHT_PIN 15
#define PIN_BUMPER_SWITCH_RIGHT_ACTIVE LOW
#define PIN_WHEEL_LIFT_LEFT_PORT D
#define PIN_WHEEL_LIFT_LEFT_PIN 6
#define PIN_WHEEL_LIFT_LEFT_ACTIVE LOW
#define PIN_WHEEL_LIFT_RIGHT_PORT D
#define PIN_WHEEL_LIFT_RIGHT_PIN 7
#define PIN_WHEEL_LIFT_RIGHT_ACTIVE LOW
#define PIN_WHEEL_CURRENT_SENSE_LEFT_PORT B
#define PIN_WHEEL_CURRENT_SENSE_LEFT_PIN 14
#define PIN_WHEEL_CURRENT_SENSE_LEFT_ACTIVE ?
#define PIN_WHEEL_CURRENT_SENSE_RIGHT_PORT B
#define PIN_WHEEL_CURRENT_SENSE_RIGHT_PIN 13
#define PIN_WHEEL_CURRENT_SENSE_RIGHT_ACTIVE HIGH
//
#define PIN_DUST_BOX_INSERTED_PORT F
#define PIN_DUST_BOX_INSERTED_PIN 0
#define PIN_DUST_BOX_INSERTED_ACTIVE LOW
#define PIN_USERBUTTON_INTERRUPT_PORT E
#define PIN_USERBUTTON_INTERRUPT_PIN 9
#define PIN_USERBUTTON_INTERRUPT_ACTIVE LOW
#define PIN_SENSOR_BOTTOM_RIGHT_PORT B
#define PIN_SENSOR_BOTTOM_RIGHT_PIN 8
#define PIN_SENSOR_BOTTOM_RIGHT_ACTIVE HIGH
#define PIN_SENSOR_BOTTOM_MIDDLE_PORT B
#define PIN_SENSOR_BOTTOM_MIDDLE_PIN 10
#define PIN_SENSOR_BOTTOM_MIDDLE_ACTIVE HIGH
#define PIN_SENSOR_BOTTOM_LEFT_PORT B
#define PIN_SENSOR_BOTTOM_LEFT_PIN 11
#define PIN_SENSOR_BOTTOM_LEFT_ACTIVE HIGH
// IR
#define PIN_MID_RECEIVER_R_PORT G
#define PIN_MID_RECEIVER_R_PIN 8
#define PIN_MID_RECEIVER_R_ACTIVE ?
#define PIN_IR_RECEIVER_REAR_RIGHT_PORT E
#define PIN_IR_RECEIVER_REAR_RIGHT_PIN 8
#define PIN_IR_RECEIVER_REAR_RIGHT_ACTIVE LOW
// ENCODERS
#define PIN_BRUSH_MAIN_ENCODER_PORT B
#define PIN_BRUSH_MAIN_ENCODER_PIN 5
#define PIN_BRUSH_MAIN_ENCODER_ACTIVE LOW
#define PIN_WHEEL_LEFT_ENCODER_1_PORT D
#define PIN_WHEEL_LEFT_ENCODER_1_PIN 8
#define PIN_WHEEL_LEFT_ENCODER_1_ACTIVE ?
#define PIN_WHEEL_LEFT_ENCODER_2_PORT D
#define PIN_WHEEL_LEFT_ENCODER_2_PIN 9
#define PIN_WHEEL_LEFT_ENCODER_2_ACTIVE ?
#define PIN_WHEEL_RIGHT_ENCODER_1_PORT D
#define PIN_WHEEL_RIGHT_ENCODER_1_PIN 11
#define PIN_WHEEL_RIGHT_ENCODER_1_ACTIVE ?
#define PIN_WHEEL_RIGHT_ENCODER_2_PORT D
#define PIN_WHEEL_RIGHT_ENCODER_2_PIN 10
#define PIN_WHEEL_RIGHT_ENCODER_2_ACTIVE ?
// MOTORS
#define PIN_WHEEL_LEFT_ENABLE_PORT D
#define PIN_WHEEL_LEFT_ENABLE_PIN 0
#define PIN_WHEEL_LEFT_ENABLE_ACTIVE HIGH
#define PIN_WHEEL_LEFT_MODE_PORT E
#define PIN_WHEEL_LEFT_MODE_PIN 7
#define PIN_WHEEL_LEFT_MODE_ACTIVE HIGH
#define PIN_WHEEL_LEFT_PHASE_PORT C
#define PIN_WHEEL_LEFT_PHASE_PIN 1
#define PIN_WHEEL_LEFT_PHASE_ACTIVE LOW
#define PIN_WHEEL_RIGHT_ENABLE_PORT D
#define PIN_WHEEL_RIGHT_ENABLE_PIN 3
#define PIN_WHEEL_RIGHT_ENABLE_ACTIVE HIGH
#define PIN_WHEEL_RIGHT_MODE_PORT G
#define PIN_WHEEL_RIGHT_MODE_PIN 6
#define PIN_WHEEL_RIGHT_MODE_ACTIVE HIGH
#define PIN_WHEEL_RIGHT_PHASE_PORT G
#define PIN_WHEEL_RIGHT_PHASE_PIN 7
#define PIN_WHEEL_RIGHT_PHASE_ACTIVE HIGH
#define PIN_BRUSH_MAIN_ENABLE_PORT D
#define PIN_BRUSH_MAIN_ENABLE_PIN 1
#define PIN_BRUSH_MAIN_ENABLE_ACTIVE HIGH
#define PIN_BRUSH_MAIN_PHASE_PORT C
#define PIN_BRUSH_MAIN_PHASE_PIN 2
#define PIN_BRUSH_MAIN_PHASE_ACTIVE LOW
#define PIN_BRUSH_MAIN_DECAY_PORT C
#define PIN_BRUSH_MAIN_DECAY_PIN 3
#define PIN_BRUSH_MAIN_DECAY_ACTIVE LOW
#define PIN_BRUSH_SIDES_PORT A
#define PIN_BRUSH_SIDES_PIN 4
#define PIN_BRUSH_SIDES_ACTIVE HIGH
#define PIN_VACUUM_ENABLE_PORT D
#define PIN_VACUUM_ENABLE_PIN 5
#define PIN_VACUUM_ENABLE_ACTIVE HIGH
// OUTPUT
#define PIN_BEEPER_PORT D
#define PIN_BEEPER_PIN 13
#define PIN_BEEPER_ACTIVE HIGH
// LEDs
#define PIN_LEDS_POWER_ALL_PORT A
#define PIN_LEDS_POWER_ALL_PIN 6
#define PIN_LEDS_POWER_ALL_ACTIVE HIGH
#define PIN_LEDS_POWER_BATTERY_PORT G
#define PIN_LEDS_POWER_BATTERY_PIN 1
#define PIN_LEDS_POWER_BATTERY_ACTIVE HIGH
#define PIN_LED_0_PORT E
#define PIN_LED_0_PIN 2
#define PIN_LED_0_ACTIVE HIGH
#define PIN_LED_1_PORT E
#define PIN_LED_1_PIN 3
#define PIN_LED_1_ACTIVE HIGH
#define PIN_LED_2_PORT E
#define PIN_LED_2_PIN 4
#define PIN_LED_2_ACTIVE HIGH
#define PIN_LED_3_PORT E
#define PIN_LED_3_PIN 5
#define PIN_LED_3_ACTIVE HIGH
#define PIN_LED_4_PORT E
#define PIN_LED_4_PIN 6
#define PIN_LED_4_ACTIVE HIGH
#define PIN_BATTERY_THERMISTOR_PORT B
#define PIN_BATTERY_THERMISTOR_PIN 4
#define PIN_BATTERY_THERMISTOR_ACTIVE ?
#define PIN_BATTERY_VOLTAGE_IN_PORT B
#define PIN_BATTERY_VOLTAGE_IN_PIN 3
#define PIN_BATTERY_VOLTAGE_IN_ACTIVE ?
#define PIN_BATTERY_VOLTAGE_OUT_PORT B
#define PIN_BATTERY_VOLTAGE_OUT_PIN 2
#define PIN_BATTERY_VOLTAGE_OUT_ACTIVE ?
#define PIN_ADAPTER_DETECT_PORT B
#define PIN_ADAPTER_DETECT_PIN 1
#define PIN_ADAPTER_DETECT_ACTIVE HIGH
#define PIN_BUTTONS_PORT B
#define PIN_BUTTONS_PIN 0
#define PIN_BUTTONS_ACTIVE HIGH
#define PIN_LEGACY_LINUX_BOARD_PIN_10_PORT A
#define PIN_LEGACY_LINUX_BOARD_PIN_10_PIN 9
#define PIN_LEGACY_LINUX_BOARD_PIN_10_ACTIVE ?
#define PIN_LEGACY_LINUX_BOARD_PIN_11_PORT B
#define PIN_LEGACY_LINUX_BOARD_PIN_11_PIN 9
#define PIN_LEGACY_LINUX_BOARD_PIN_11_ACTIVE HIGH
#define PIN_RECEIVER_MID_LEFT_PORT A
#define PIN_RECEIVER_MID_LEFT_PIN 10
#define PIN_RECEIVER_MID_LEFT_ACTIVE ?
#define PIN_ACCELGYRO_POWER_PORT F
#define PIN_ACCELGYRO_POWER_PIN 7
#define PIN_ACCELGYRO_POWER_ACTIVE LOW
#define PIN_IR_RECEIVER_REAR_LEFT_PORT F
#define PIN_IR_RECEIVER_REAR_LEFT_PIN 6
#define PIN_IR_RECEIVER_REAR_LEFT_ACTIVE LOW
#define PIN_DOCKING_RECEIVER_LEFT_PORT A
#define PIN_DOCKING_RECEIVER_LEFT_PIN 14
#define PIN_DOCKING_RECEIVER_LEFT_ACTIVE LOW
#define PIN_DOCKING_RECEIVER_RIGHT_PORT A
#define PIN_DOCKING_RECEIVER_RIGHT_PIN 15
#define PIN_DOCKING_RECEIVER_RIGHT_ACTIVE LOW
#define PIN_CHARGING_ENABLE_PORT D
#define PIN_CHARGING_ENABLE_PIN 2
#define PIN_CHARGING_ENABLE_ACTIVE ?
#define PIN_SEGMENT_DISPLAY_COLON_PORT F
#define PIN_SEGMENT_DISPLAY_COLON_PIN 1
#define PIN_SEGMENT_DISPLAY_COLON_ACTIVE HIGH
#define PIN_LED_UNKNOWNS_PORT G
#define PIN_LED_UNKNOWNS_PIN 0
#define PIN_LED_UNKNOWNS_ACTIVE HIGH
#define PIN_LED_CHAR_1_PORT A
#define PIN_LED_CHAR_1_PIN 7
#define PIN_LED_CHAR_1_ACTIVE HIGH
#define PIN_LED_SEGMENT_TOP_PORT E
#define PIN_LED_SEGMENT_TOP_PIN 0
#define PIN_LED_SEGMENT_TOP_ACTIVE HIGH
#define PIN_LED_SEGMENT_TOP_RIGHT_PORT E
#define PIN_LED_SEGMENT_TOP_RIGHT_PIN 1
#define PIN_LED_SEGMENT_TOP_RIGHT_ACTIVE HIGH
#define PIN_LED_CHAR_2_PORT G
#define PIN_LED_CHAR_2_PIN 14
#define PIN_LED_CHAR_2_ACTIVE HIGH
#define PIN_LED_CHAR_4_PORT G
#define PIN_LED_CHAR_4_PIN 12
#define PIN_LED_CHAR_4_ACTIVE HIGH
#define PIN_LED_CHAR_3_PORT G
#define PIN_LED_CHAR_3_PIN 13
#define PIN_LED_CHAR_3_ACTIVE HIGH
// ICs
#define PIN_IC16_A_PORT A
#define PIN_IC16_A_PIN 1
#define PIN_IC16_A_ACTIVE HIGH
#define PIN_IC16_B_PORT F
#define PIN_IC16_B_PIN 13
#define PIN_IC16_B_ACTIVE HIGH
#define PIN_IC16_C_PORT C
#define PIN_IC16_C_PIN 4
#define PIN_IC16_C_ACTIVE HIGH
#define PIN_IC16_X_PORT D
#define PIN_IC16_X_PIN 4
#define PIN_IC16_X_ACTIVE HIGH
#define PIN_IC_SENSORS_A_PORT D
#define PIN_IC_SENSORS_A_PIN 15
#define PIN_IC_SENSORS_A_ACTIVE HIGH
#define PIN_IC_SENSORS_B_PORT D
#define PIN_IC_SENSORS_B_PIN 14
#define PIN_IC_SENSORS_B_ACTIVE HIGH
#define PIN_IC_SENSORS_C_PORT B
#define PIN_IC_SENSORS_C_PIN 15
#define PIN_IC_SENSORS_C_ACTIVE HIGH
#define PIN_IC_SENSORS_X_IN_PORT B
#define PIN_IC_SENSORS_X_IN_PIN 12
#define PIN_IC_SENSORS_X_IN_ACTIVE HIGH
#define PIN_IC_SENSORS_X_OUT_PORT D
#define PIN_IC_SENSORS_X_OUT_PIN 12
#define PIN_IC_SENSORS_X_OUT_ACTIVE HIGH
// COMMUNICATION
/*
// SPI is not used anymore
#define PIN_CONNECTION_SCK_PORT C
#define PIN_CONNECTION_SCK_PIN 13
#define PIN_CONNECTION_SCK_ACTIVE HIGH
#define PIN_CONNECTION_MISO_PORT B
#define PIN_CONNECTION_MISO_PIN 7
#define PIN_CONNECTION_MISO_ACTIVE HIGH
#define PIN_CONNECTION_MOSI_PORT B
#define PIN_CONNECTION_MOSI_PIN 6
#define PIN_CONNECTION_MOSI_ACTIVE HIGH
*/
#define PIN_CONNECTION_RX_PORT C
#define PIN_CONNECTION_RX_PIN 13
#define PIN_CONNECTION_RX_ACTIVE HIGH
#define PIN_CONNECTION_TX_PORT B
#define PIN_CONNECTION_TX_PIN 7
#define PIN_CONNECTION_TX_ACTIVE HIGH
/*
#define PIN_CONNECTION_MOSI_PORT B
#define PIN_CONNECTION_MOSI_PIN 6
#define PIN_CONNECTION_MOSI_ACTIVE HIGH
*/
// TEMPLATE
//#define PIN__PORT
//#define PIN__PIN
//#define PIN__ACTIVE HIGH