Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
115 lines (105 sloc) 5.79 KB
/*
* LedMapping.h
*
* Created on: 24 janv. 2016
* Author: nicolas
*/
#ifndef SRC_IO_OUTPUT_LEDMAPPING_H_
#define SRC_IO_OUTPUT_LEDMAPPING_H_
#include <stdint.h>
#define LED_COUNT 41
#define PIN_LED_0 40
#define PIN_LED_1 29
#define PIN_LED_2 28
#define PIN_LED_3 27
#define PIN_LED_4 26
#define PIN_LED_5 25
#define PIN_LED_6 24
#define PIN_LED_7 39
#define PIN_LED_8 38
#define PIN_LED_9 37
#define PIN_LED_10 36
#define PIN_LED_11 35
#define PIN_LED_12 34
#define PIN_LED_13 33
#define PIN_LED_14 32
#define PIN_LED_15 31
#define PIN_LED_16 30
#define PIN_LED_17 15
#define PIN_LED_18 16
#define PIN_LED_19 17
#define PIN_LED_20 18
#define PIN_LED_21 19
#define PIN_LED_22 20
#define PIN_LED_23 21
#define PIN_LED_24 22
#define PIN_LED_25 23
#define PIN_LED_26 0
#define PIN_LED_27 1
#define PIN_LED_28 2
#define PIN_LED_29 3
#define PIN_LED_30 4
#define PIN_LED_31 5
#define PIN_LED_32 6
#define PIN_LED_33 7
#define PIN_LED_34 8
#define PIN_LED_35 9
#define PIN_LED_36 10
#define PIN_LED_37 11
#define PIN_LED_38 12
#define PIN_LED_39 13
#define PIN_LED_40 14
#define LED_MASK_NONE 0b00000000000000000000000000000000000000000
#define LED_MASK_ALL 0b11111111111111111111111111111111111111111
#define LED_MASK_TOP_RIGHT_QUARTER 0b11111000000000000111111000000000000000000
#define LED_MASK_BOTTOM_RIGHT_QUARTER 0b10000111100000000000000111111000000000000
#define LED_MASK_BOTTOM_LEFT_QUARTER 0b10000000011110000000000000000111111000000
#define LED_MASK_TOP_LEFT_QUARTER 0b10000000000001111000000000000000000111111
#define LED_MASK_CENTER 0b10000000000000000000000000000000000000000
#define LED_MASK_LITTLE_RING 0b01111111111111111000000000000000000000000
#define LED_MASK_BIG_RING 0b00000000000000000111111111111111111111111
#define LED_MASK_CROSS 0b10010010000100100000100001000000100001000
#define LED_MASK_RADAR 0b01111111011111110111111111110111111111110
#define LED_MASK_LED_0 0b10000000000000000000000000000000000000000
#define LED_MASK_LED_1 0b01000000000000000000000000000000000000000
#define LED_MASK_LED_2 0b00100000000000000000000000000000000000000
#define LED_MASK_LED_3 0b00010000000000000000000000000000000000000
#define LED_MASK_LED_4 0b00001000000000000000000000000000000000000
#define LED_MASK_LED_5 0b00000100000000000000000000000000000000000
#define LED_MASK_LED_6 0b00000010000000000000000000000000000000000
#define LED_MASK_LED_7 0b00000001000000000000000000000000000000000
#define LED_MASK_LED_8 0b00000000100000000000000000000000000000000
#define LED_MASK_LED_9 0b00000000010000000000000000000000000000000
#define LED_MASK_LED_10 0b00000000001000000000000000000000000000000
#define LED_MASK_LED_11 0b00000000000100000000000000000000000000000
#define LED_MASK_LED_12 0b00000000000010000000000000000000000000000
#define LED_MASK_LED_13 0b00000000000001000000000000000000000000000
#define LED_MASK_LED_14 0b00000000000000100000000000000000000000000
#define LED_MASK_LED_15 0b00000000000000010000000000000000000000000
#define LED_MASK_LED_16 0b00000000000000001000000000000000000000000
#define LED_MASK_LED_17 0b00000000000000000100000000000000000000000
#define LED_MASK_LED_18 0b00000000000000000010000000000000000000000
#define LED_MASK_LED_19 0b00000000000000000001000000000000000000000
#define LED_MASK_LED_20 0b00000000000000000000100000000000000000000
#define LED_MASK_LED_21 0b00000000000000000000010000000000000000000
#define LED_MASK_LED_22 0b00000000000000000000001000000000000000000
#define LED_MASK_LED_23 0b00000000000000000000000100000000000000000
#define LED_MASK_LED_24 0b00000000000000000000000010000000000000000
#define LED_MASK_LED_25 0b00000000000000000000000001000000000000000
#define LED_MASK_LED_26 0b00000000000000000000000000100000000000000
#define LED_MASK_LED_27 0b00000000000000000000000000010000000000000
#define LED_MASK_LED_28 0b00000000000000000000000000001000000000000
#define LED_MASK_LED_29 0b00000000000000000000000000000100000000000
#define LED_MASK_LED_30 0b00000000000000000000000000000010000000000
#define LED_MASK_LED_31 0b00000000000000000000000000000001000000000
#define LED_MASK_LED_32 0b00000000000000000000000000000000100000000
#define LED_MASK_LED_33 0b00000000000000000000000000000000010000000
#define LED_MASK_LED_34 0b00000000000000000000000000000000001000000
#define LED_MASK_LED_35 0b00000000000000000000000000000000000100000
#define LED_MASK_LED_36 0b00000000000000000000000000000000000010000
#define LED_MASK_LED_37 0b00000000000000000000000000000000000001000
#define LED_MASK_LED_38 0b00000000000000000000000000000000000000100
#define LED_MASK_LED_39 0b00000000000000000000000000000000000000010
#define LED_MASK_LED_40 0b00000000000000000000000000000000000000001
const static uint8_t idToPinLedMap[LED_COUNT] = {PIN_LED_0, PIN_LED_1, PIN_LED_2, PIN_LED_3, PIN_LED_4, PIN_LED_5, PIN_LED_6, PIN_LED_7, PIN_LED_8, PIN_LED_9, PIN_LED_10, PIN_LED_11, PIN_LED_12, PIN_LED_13, PIN_LED_14, PIN_LED_15, PIN_LED_16, PIN_LED_17, PIN_LED_18, PIN_LED_19, PIN_LED_20, PIN_LED_21, PIN_LED_22, PIN_LED_23, PIN_LED_24, PIN_LED_25, PIN_LED_26, PIN_LED_27, PIN_LED_28, PIN_LED_29, PIN_LED_30, PIN_LED_31, PIN_LED_32, PIN_LED_33, PIN_LED_34, PIN_LED_35, PIN_LED_36, PIN_LED_37, PIN_LED_38, PIN_LED_39, PIN_LED_40};
#endif /* SRC_IO_OUTPUT_LEDMAPPING_H_ */