|
| 1 | +/* |
| 2 | + * Copyright (C) 2022 SSV Software Systems GmbH |
| 3 | + * |
| 4 | + * This file is subject to the terms and conditions of the GNU Lesser |
| 5 | + * General Public License v2.1. See the file LICENSE in the top level |
| 6 | + * directory for more details. |
| 7 | + */ |
| 8 | + |
| 9 | +/** |
| 10 | + * @ingroup boards_xg23b-pk6068a |
| 11 | + * @{ |
| 12 | + * |
| 13 | + * @file |
| 14 | + * @brief Board specific definitions for the xG23B-PK6068A |
| 15 | + * |
| 16 | + * @author Juergen Fitschen <[email protected]> |
| 17 | + */ |
| 18 | + |
| 19 | +#ifndef BOARD_H |
| 20 | +#define BOARD_H |
| 21 | + |
| 22 | +#include "cpu.h" |
| 23 | +#include "periph_conf.h" |
| 24 | +#include "periph_cpu.h" |
| 25 | + |
| 26 | +#ifdef __cplusplus |
| 27 | +extern "C" { |
| 28 | +#endif |
| 29 | + |
| 30 | +/** |
| 31 | + * @brief Initialize pm_layered with no pre-defined blockers |
| 32 | + * |
| 33 | + * All peripheral drivers keep track of required pm modes. |
| 34 | + */ |
| 35 | +#define PM_BLOCKER_INITIAL { 0, 0, 0 } |
| 36 | + |
| 37 | +/** |
| 38 | + * @name ztimer configuration |
| 39 | + * @{ |
| 40 | + */ |
| 41 | +#define CONFIG_ZTIMER_LPTIMER_DEV TIMER_DEV(1) |
| 42 | +#define CONFIG_ZTIMER_LPTIMER_FREQ LFXO_FREQ |
| 43 | +#define CONFIG_ZTIMER_LPTIMER_WIDTH 24 |
| 44 | +#define CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE -1 |
| 45 | +/** @} */ |
| 46 | + |
| 47 | +/** |
| 48 | + * @brief Power mode required for GPIO IRQs |
| 49 | + * |
| 50 | + * If all GPIO IRQs are expected on port A or B, EM3 is the lowest allowed |
| 51 | + * power mode. No power level has to be blocked in this case. |
| 52 | + * If GPIO IRQs shall be fired on port C or D, we must stay in EM1. |
| 53 | + * Uncomment the line down below in this case. |
| 54 | + */ |
| 55 | +//#define GPIO_INT_PM_BLOCKER PM_MODE_EM2 |
| 56 | + |
| 57 | +/** |
| 58 | + * @name Board VCOM interface |
| 59 | + * |
| 60 | + * Define the GPIO pin to enable the VCOM interface |
| 61 | + */ |
| 62 | +#define VCOM_UART UART_DEV(0) |
| 63 | +#define VCOM_EN_PIN GPIO_PIN(PB, 0) |
| 64 | + |
| 65 | +/** |
| 66 | + * @name Push button pin definitions |
| 67 | + * @{ |
| 68 | + */ |
| 69 | +#define PB0_PIN GPIO_PIN(PB, 1) |
| 70 | +#define PB1_PIN GPIO_PIN(PB, 3) |
| 71 | +/** @} */ |
| 72 | + |
| 73 | +/** |
| 74 | + * @name LED pin definitions |
| 75 | + * @{ |
| 76 | + */ |
| 77 | +#define LED0_PIN GPIO_PIN(PB, 2) |
| 78 | +#define LED1_PIN GPIO_PIN(PD, 3) |
| 79 | +/** @} */ |
| 80 | + |
| 81 | +/** |
| 82 | + * @name Macros for controlling the on-board LEDs |
| 83 | + * @{ |
| 84 | + */ |
| 85 | +#define LED0_ON gpio_set(LED0_PIN) |
| 86 | +#define LED0_OFF gpio_clear(LED0_PIN) |
| 87 | +#define LED0_TOGGLE gpio_toggle(LED0_PIN) |
| 88 | +#define LED1_ON gpio_set(LED1_PIN) |
| 89 | +#define LED1_OFF gpio_clear(LED1_PIN) |
| 90 | +#define LED1_TOGGLE gpio_toggle(LED1_PIN) |
| 91 | +/** @} */ |
| 92 | + |
| 93 | +/** |
| 94 | + * @name Display configuration |
| 95 | + * |
| 96 | + * Connection to the on-board Sharp Memory LCD (LS013B7DH03). |
| 97 | + * @{ |
| 98 | + */ |
| 99 | +#define DISP_SPI SPI_DEV(0) |
| 100 | +#define DISP_CS_PIN GPIO_PIN(PC, 8) |
| 101 | +#define DISP_COM_PIN GPIO_PIN(PC, 6) |
| 102 | +#define DISP_ENABLE_PIN GPIO_PIN(PC, 9) |
| 103 | +/** @} */ |
| 104 | + |
| 105 | +/** |
| 106 | + * @name Flash configuration |
| 107 | + * |
| 108 | + * Connection to the on-board MX25R8035F. |
| 109 | + * @{ |
| 110 | + */ |
| 111 | +#define FLASH_SPI SPI_DEV(0) |
| 112 | +#define FLASH_CS_PIN GPIO_PIN(PC, 4) |
| 113 | +/** @} */ |
| 114 | + |
| 115 | +/** |
| 116 | + * @name Sensor configuration |
| 117 | + * |
| 118 | + * Connection to the on-board Si7021 temperature & humidity sensor. |
| 119 | + * @{ |
| 120 | + */ |
| 121 | +#define SENSOR_I2C I2C_DEV(0) |
| 122 | +#define SENSOR_ENABLE_PIN GPIO_PIN(PC, 9) |
| 123 | +/** @} */ |
| 124 | + |
| 125 | +/** |
| 126 | + * @brief Initialize board specific hardware |
| 127 | + */ |
| 128 | +void board_init(void); |
| 129 | + |
| 130 | +#ifdef __cplusplus |
| 131 | +} |
| 132 | +#endif |
| 133 | + |
| 134 | +#endif /* BOARD_H */ |
| 135 | +/** @} */ |
0 commit comments