blob: 3bd9a331d097e94dda08472bb2114cbcf4eabb42 [file] [log] [blame]
David Brazdil3d7b88b2019-07-22 17:19:35 +01001# Copyright 2019 The Hafnium Authors.
2#
Andrew Walbran23417d82020-06-17 14:44:22 +01003# Use of this source code is governed by a BSD-style
4# license that can be found in the LICENSE file or at
5# https://opensource.org/licenses/BSD-3-Clause.
David Brazdil3d7b88b2019-07-22 17:19:35 +01006
7import("args.gni")
8
9source_set("mini_uart") {
Olivier Depreza2293ae2023-02-02 09:51:53 +010010 sources = [ "mini_uart.c" ]
David Brazdil3d7b88b2019-07-22 17:19:35 +010011
12 assert(gpio_base_address != 0,
13 "\"gpio_base_address\" must be defined for ${target_name}.")
14 assert(aux_base_address != 0,
15 "\"aux_base_address\" must be defined for ${target_name}.")
16 assert(core_freq_mhz != 0,
17 "\"core_freq_mhz\" must be defined for ${target_name}.")
18 assert(baudrate != 0, "\"baudrate\" must be defined for ${target_name}.")
19
20 defines = [
21 "GPIO_BASE=${gpio_base_address}",
22 "AUX_BASE=${aux_base_address}",
23 "CORE_FREQ_MHZ=${core_freq_mhz}",
24 "BAUDRATE=${baudrate}",
25 ]
26}