ARMEBS4  revision-26.06.2015
bsp_armebs4.h
Go to the documentation of this file.
1 /************************************************************************//**
2  * \file bsp_armebs4.h
3  * \brief BSP for ARMEBS4
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 #include "heivs/bsp_armebs4_eth.h"
14 
15 #ifndef BOARD_ARMEBS4
16 #error this file should not be included by hand
17 #endif
18 
19 #define BSP_BOARD_PRETTY_NAME "HEIVs ARMEBS4 r1.0"
20 #define BSP_LED_NR 4 ///< Number of LEDs
21 #define BSP_PWM_LED_STEPS LIGHTNESS_PWM_STEP ///< Lightness correction
22 
23 #define BSP_BUTTON_NR 4 ///< Number of buttons
24 
25 #define BSP_I2C_BUS_COUNT 2 ///< Number of i2c buses
26 #define BSP_I2C_BUS_LOCAL &bus_i2c[0] ///< Bus name
27 #define BSP_I2C_BUS0_NAME "i2c_local"
28 #define BSP_I2C_BUS0_CTRL I2C1 ///< On this controller
29 #define BSP_I2C_BUS0_GPIO_SCL GPIO_I2C1_SCL_PB8 ///< SCL on this pin
30 #define BSP_I2C_BUS0_GPIO_SDA GPIO_I2C1_SDA_PB9 ///< SDA on this pin
31 
32 #define BSP_I2C_BUS_EXTERN &bus_i2c[1] ///< Bus name
33 #define BSP_I2C_BUS1_NAME "i2c_extern"
34 #define BSP_I2C_BUS1_CTRL I2C2 ///< On this controller
35 #define BSP_I2C_BUS1_GPIO_SCL GPIO_I2C2_SCL_PH4 ///< SCL on this pin
36 #define BSP_I2C_BUS1_GPIO_SDA GPIO_I2C2_SDA_PH5 ///< SDA on this pin
37 
38 #define BSP_SPI_BUS_COUNT 1 ///< Number of SPI buses
39 #define BSP_SPI_BUS_EXTERN &bus_spi[0] ///< Bus name
40 #define BSP_SPI_BUS0_NAME "spi_extern"
41 #define BSP_SPI_BUS0_CTRL SPI3 ///< On this controller
42 #define BSP_SPI_BUS0_GPIO_MISO GPIO_SPI3_MISO_PC11 ///< MISO on this pin
43 #define BSP_SPI_BUS0_GPIO_MOSI GPIO_SPI3_MOSI_PB5 ///< MOSI on this pin
44 #define BSP_SPI_BUS0_GPIO_SCK GPIO_SPI3_SCK_I2S3S_CK_PC10 ///< SCK on this pin
45 #define BSP_SPI_BUS0_GPIO_CS DEF_GPIOA(4, GPIO_OUTPUT_1 | GPIO_SPEED_100) ///< CS on this pin
46 
47 #define BSP_USART_BUS_COUNT 2 ///< Usart buses count
48 #define BSP_USART_BUS_DEBUG &bus_usart[0] ///< bus name
49 #define BSP_USART_BUS0_NAME "dbg_uart"
50 #define BSP_USART_BUS0_CTRL USART1 // On this controller
51 #define BSP_USART_BUS0_SPEED 115200 // Speed
52 #define BSP_USART_BUS0_GPIO_TX GPIO_USART1_TX_PB6 // TX on this pin
53 #define BSP_USART_BUS0_GPIO_RX GPIO_USART1_RX_PB7 // RX on this pin
54 
55 #define BSP_USART_BUS_EXTERN &bus_usart[1] ///< bus name
56 #define BSP_USART_BUS1_NAME "extern_uart"
57 #define BSP_USART_BUS1_CTRL USART3 // On this controller
58 #define BSP_USART_BUS1_SPEED 115200 // Speed
59 #define BSP_USART_BUS1_GPIO_TX GPIO_USART3_TX_PB10 // TX on this pin
60 #define BSP_USART_BUS1_GPIO_RX GPIO_USART3_RX_PB11 // RX on this pin
61 
62 #ifdef __cplusplus
63  extern "C" {
64 #endif
65 
66 /**
67  * \brief Set the brightness of the backlight
68  * \param value the value from 0 to BSP_PWM_LED_STEPS, 0 is off
69  *
70  * \see BSP_PWM_LED_STEPS
71  */
72 void bsp_lcd_backlight_set(uint32_t value);
73 
74 #ifdef __cplusplus
75  }
76 #endif
77 
78 #define PIN_RESET_NOT_ETHERNET DEF_GPIOH( 6, GPIO_OUTPUT_0 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
79 #define PIN_RESET_NOT_CAMERA DEF_GPIOH( 2, GPIO_OUTPUT_0 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
80 #define PIN_RESET_NOT_SCREEN DEF_GPIOH( 3, GPIO_OUTPUT_0 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
81 #define PIN_VBUS_NOT DEF_GPIOF(10, GPIO_OUTPUT_1 | GPIO_PP | GPIO_SPEED_100 | GPIO_NOPULL)
82 #define PIN_WD DEF_GPIOG(15, GPIO_INPUT)
83 #define EXT_RAM_BASE 0x60000000
84 #define EXT_RAM_SIZE (8*1024*1024)
85 
86 #define BSP_HAS_NVM 1
87 
88 /**
89  * @}
90  */
91 #endif /* HEIVS_BSP_ARMEBS4_H */
Handle non-linearity in human eye brightness sensitivity.
void bsp_lcd_backlight_set(uint32_t value)
Set the brightness of the backlight.
Definition: bsp_armebs4.c:314
BSP for ARMEBS4 Ethernet.