package embox.driver.serial

abstract module stm32_usart_ops {

}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_f1 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_f1.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_f2 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_f2.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_f3 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_f3.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_f4 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_f4.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_f7 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_f7.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_h7 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_h7.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_l1 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_l1.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(third_party.bsp.st_bsp_api)
module stm_usart_l4 extends stm32_usart_ops {

	@IncludeExport(path="drivers/serial", target_name="stm_usart.h")
	source "stm32_usart_conf_l4.h"

	source "stm_hal_msp.c"
	source "stm_usart.c"

	depends embox.driver.serial.core

	depends third_party.bsp.st_bsp_api
}

@BuildDepends(stm32_usart_ops)
module stm_diag extends embox.driver.serial.diag {
	option number baud_rate
	option number usartx
	
	source "stm_diag.c"
}

@BuildDepends(stm32_usart_ops)
module stm_ttyS0 {
	option number baud_rate
	option number usartx

	source "stm_ttyS0.c"
	option string ttys_name = "ttyS0"

	depends stm32_usart_ops
}

@BuildDepends(stm32_usart_ops)
module stm_ttyS1 {
	option number baud_rate
	option number usartx

	source "stm_ttyS1.c"
	option string ttys_name = "ttyS1"

	depends stm32_usart_ops
}

@BuildDepends(stm32_usart_ops)
module stm_ttyS2 {
	option number baud_rate
	option number usartx

	source "stm_ttyS2.c"
	option string ttys_name = "ttyS2"

	depends stm32_usart_ops
}

@BuildDepends(stm32_usart_ops)
module stm_ttyS3 {
	option number baud_rate
	option number usartx

	source "stm_ttyS3.c"
	option string ttys_name = "ttyS3"

	depends stm32_usart_ops
}
	
@BuildDepends(stm32_usart_ops)
module stm_ttyS4 {
	option number baud_rate
	option number usartx

	source "stm_ttyS4.c"
	option string ttys_name = "ttyS4"

	depends stm32_usart_ops
}

@BuildDepends(stm32_usart_ops)
module stm_ttyS5 {
	option number baud_rate
	option number usartx

	source "stm_ttyS5.c"
	option string ttys_name = "ttyS5"

	depends stm32_usart_ops
}
