blob: 52faef7442ba05aabdb14376ad095ee403516fc0 [file] [log] [blame]
Marc Bonnicid6a274d2020-09-29 15:36:31 +01001# Copyright 2020 The Hafnium Authors.
David Brazdil3d7b88b2019-07-22 17:19:35 +01002#
Marc Bonnicid6a274d2020-09-29 15:36:31 +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}