blob: c6e03cf77de0539b765ae6ecef5cb82840d5d6e6 [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") {
10 sources = [
11 "mini_uart.c",
12 ]
13
14 assert(gpio_base_address != 0,
15 "\"gpio_base_address\" must be defined for ${target_name}.")
16 assert(aux_base_address != 0,
17 "\"aux_base_address\" must be defined for ${target_name}.")
18 assert(core_freq_mhz != 0,
19 "\"core_freq_mhz\" must be defined for ${target_name}.")
20 assert(baudrate != 0, "\"baudrate\" must be defined for ${target_name}.")
21
22 defines = [
23 "GPIO_BASE=${gpio_base_address}",
24 "AUX_BASE=${aux_base_address}",
25 "CORE_FREQ_MHZ=${core_freq_mhz}",
26 "BAUDRATE=${baudrate}",
27 ]
28}