update script to update param list and save in hal_api_uart.slx

This commit is contained in:
Matthew GONG
2020-03-18 08:59:19 +08:00
parent bbbb3701c4
commit c70b0eb0eb
2 changed files with 7 additions and 1 deletions
BIN
View File
Binary file not shown.
+7 -1
View File
@@ -1,5 +1,9 @@
function hal_uart_param_update_lst
lst = {'0:BaudRate','1:WordLen','2:StopBits','3:Parity'};
lst = {'0:BaudRate','1:WordLen','2:StopBits','3:Parity','4:RxBuff',...
'5:TxBuff','6:Options'};
load_system('hal_api_uart');
set_param('hal_api_uart','Lock','off');
b = Simulink.Mask.get('hal_api_uart/hal_uart_get_param');
p = b.Parameters(4);
@@ -9,5 +13,7 @@ b = Simulink.Mask.get('hal_api_uart/hal_uart_set_param');
p = b.Parameters(4);
p.set('TypeOptions',lst);
set_param('hal_api_uart','Lock','on');
close_system('hal_api_uart',1);
end