Demo to control 4 LEDs

Dependencies:   BSP_DISCO_F469NI mbed

Committer:
Faberge
Date:
Tue Oct 31 14:46:28 2017 +0000
Revision:
2:e6fc24fbd86c
Parent:
1:a6d179a9ffbb
Update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Faberge 1:a6d179a9ffbb 1 /*
Faberge 1:a6d179a9ffbb 2 * ADC.h
Faberge 1:a6d179a9ffbb 3 *
Faberge 1:a6d179a9ffbb 4 * Copyright 2017 Faberge@TsarTeam
Faberge 1:a6d179a9ffbb 5 *
Faberge 1:a6d179a9ffbb 6 * This program is free software; you can redistribute it and/or modify
Faberge 1:a6d179a9ffbb 7 * it under the terms of the GNU General Public License as published by
Faberge 1:a6d179a9ffbb 8 * the Free Software Foundation; either version 2 of the License, or
Faberge 1:a6d179a9ffbb 9 * (at your option) any later version.
Faberge 1:a6d179a9ffbb 10 *
Faberge 1:a6d179a9ffbb 11 * This program is distributed in the hope that it will be useful,
Faberge 1:a6d179a9ffbb 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Faberge 1:a6d179a9ffbb 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Faberge 1:a6d179a9ffbb 14 * GNU General Public License for more details.
Faberge 1:a6d179a9ffbb 15 *
Faberge 1:a6d179a9ffbb 16 */
Faberge 1:a6d179a9ffbb 17
Faberge 1:a6d179a9ffbb 18 #ifndef ADC_H
Faberge 1:a6d179a9ffbb 19 #define ADC_H
Faberge 1:a6d179a9ffbb 20
Faberge 1:a6d179a9ffbb 21 #include "stm32f4xx_hal.h"
Faberge 1:a6d179a9ffbb 22
Faberge 1:a6d179a9ffbb 23 const uint16_t A0 = 1;
Faberge 1:a6d179a9ffbb 24 const uint16_t A1 = 2;
Faberge 1:a6d179a9ffbb 25 const uint16_t A2 = 3;
Faberge 1:a6d179a9ffbb 26
Faberge 1:a6d179a9ffbb 27 class Analog
Faberge 1:a6d179a9ffbb 28 {
Faberge 1:a6d179a9ffbb 29 public:
Faberge 1:a6d179a9ffbb 30 int read() {return 111;}
Faberge 1:a6d179a9ffbb 31 };
Faberge 1:a6d179a9ffbb 32
Faberge 1:a6d179a9ffbb 33 uint16_t analogRead(const uint16_t channel);
Faberge 1:a6d179a9ffbb 34
Faberge 1:a6d179a9ffbb 35
Faberge 1:a6d179a9ffbb 36 #endif
Faberge 1:a6d179a9ffbb 37