ARMEBS4  revision-26.06.2015
bsp_envirobot_sc.h
Go to the documentation of this file.
1 /************************************************************************//**
2  * \file bsp_envirobot_sc.h
3  * \brief BSP for Envirobot Sensor Control
4  * \author marc dot pignat at hevs dot ch
5  * \ingroup bsp
6  * @{
7  ***************************************************************************/
8 #ifndef HEIVS_BSP_ARMEBS4_H
9 #define HEIVS_BSP_ARMEBS4_H
10 
11 #include <stdint.h>
12 #include "heivs/lightness_to_pwm.h"
13 
14 #ifndef BOARD_ENVIROBOT_SC
15 #error this file should not be included by hand
16 #endif
17 
18 #define BSP_BOARD_PRETTY_NAME "HEIVs Envirobot Sensor control v1.1"
19 #define BSP_LED_NR 3 ///< Number of LEDs
20 #define BSP_PWM_LED_STEPS LIGHTNESS_PWM_STEP ///< Lightness correction
21 
22 #define BSP_BUTTON_NR 2 ///< Number of buttons
23 
24 #define BSP_I2C_BUS_COUNT 2 ///< Number of i2c buses
25 #define BSP_I2C_BUS_LOCAL &bus_i2c[0] ///< Bus name
26 #define BSP_I2C_BUS0_NAME "ctrl_i2c1"
27 #define BSP_I2C_BUS0_CTRL I2C1 ///< On this controller
28 #define BSP_I2C_BUS0_GPIO_SCL GPIO_I2C1_SCL_PB8 ///< SCL on this pin
29 #define BSP_I2C_BUS0_GPIO_SDA GPIO_I2C1_SDA_PB9 ///< SDA on this pin
30 
31 #define BSP_I2C_BUS_EXTERN &bus_i2c[1] ///< Bus name
32 #define BSP_I2C_BUS1_NAME "sensor_i2c2"
33 #define BSP_I2C_BUS1_CTRL I2C2 ///< On this controller
34 #define BSP_I2C_BUS1_GPIO_SCL GPIO_I2C2_SCL_PB10 ///< SCL on this pin
35 #define BSP_I2C_BUS1_GPIO_SDA GPIO_I2C2_SDA_PB11 ///< SDA on this pin
36 
37 #define BSP_SPI_BUS_COUNT 1 ///< Number of SPI buses
38 #define BSP_SPI_BUS_EXTERN &bus_spi[0] ///< Bus name
39 #define BSP_SPI_BUS0_NAME "spi_extern"
40 #define BSP_SPI_BUS0_CTRL SPI3 ///< On this controller
41 #define BSP_SPI_BUS0_GPIO_MISO GPIO_SPI3_MISO_PC11 ///< MISO on this pin
42 #define BSP_SPI_BUS0_GPIO_MOSI GPIO_SPI3_MOSI_PB5 ///< MOSI on this pin
43 #define BSP_SPI_BUS0_GPIO_SCK GPIO_SPI3_SCK_I2S3S_CK_PC10 ///< SCK on this pin
44 #define BSP_SPI_BUS0_GPIO_CS DEF_GPIOA(4, GPIO_OUTPUT_1 | GPIO_SPEED_100) ///< CS on this pin
45 
46 #define BSP_USART_BUS_COUNT 2 ///< Usart buses count
47 #define BSP_USART_BUS_DEBUG &bus_usart[0] ///< bus name
48 #define BSP_USART_BUS0_NAME "dbg_uart"
49 #define BSP_USART_BUS0_CTRL USART1 // On this controller
50 #define BSP_USART_BUS0_SPEED 115200 // Speed
51 #define BSP_USART_BUS0_GPIO_TX GPIO_USART1_TX_PA9 // TX on this pin
52 #define BSP_USART_BUS0_GPIO_RX GPIO_USART1_RX_PB7 // RX on this pin
53 
54 #define BSP_USART_BUS_EXTERN &bus_usart[1] ///< bus name
55 #define BSP_USART_BUS1_NAME "sensor_uart"
56 #define BSP_USART_BUS1_CTRL USART2 // On this controller
57 #define BSP_USART_BUS1_SPEED 115200 // Speed
58 #define BSP_USART_BUS1_GPIO_TX GPIO_USART2_TX_PD5 // TX on this pin
59 #define BSP_USART_BUS1_GPIO_RX GPIO_USART2_RX_PA3 // RX on this pin
60 
61 #ifdef __cplusplus
62  extern "C" {
63 #endif
64 
65 
66 #ifdef __cplusplus
67  }
68 #endif
69 
70 #define PIN_RESET_NOT_ETHERNET DEF_GPIOH( 6, GPIO_OUTPUT_0 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
71 #define PIN_RESET_NOT_CAMERA DEF_GPIOH( 2, GPIO_OUTPUT_0 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
72 #define PIN_RESET_NOT_SCREEN DEF_GPIOH( 3, GPIO_OUTPUT_0 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
73 #define PIN_VBUS_NOT DEF_GPIOF(10, GPIO_OUTPUT_1 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
74 #define PIN_WD DEF_GPIOC( 2, GPIO_INPUT)
75 #define EXT_SDRAM_BASE 0xd0000000
76 #define EXT_SDRAM_SIZE (8*1024*1024)
77 
78 #define BSP_HAS_NVM 0
79 
80 /**
81  * @}
82  */
83 #endif /* HEIVS_BSP_ARMEBS4_H */
Handle non-linearity in human eye brightness sensitivity.