-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloseApi.m
34 lines (32 loc) · 1 KB
/
closeApi.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function closeApi(Bhapi, MpSys)
arguments
Bhapi(1,1) struct;
MpSys(1,1) struct;
end
% CLOSEAPI Ends the application programming interface.
% CLOSEAPI(Bhapi, MpSys) ends the BHAPI with the settings specified in
% the Bhapi and MpSys structure arrays.
%
% See also OPENAPI, SETAPI, SETDAQ.
%
%
%
% === DESCRIPTION =========================================================
% This function switches off the BIOPAC Hardware Application Programming
% Interface (BHAPI). Before recording, openApi() is used.
%
% INPUT
% - Bhapi API settings.
% - MpSys DAQ settings.
%
% ----------
% Author : Valerio Villani
% E-mail : [email protected]
% Created: 2023-04-26, using MATLAB 9.10.0.1669831 (R2021a) Update 2
% =========================================================================
% Portions Copyright 2004-2009 BIOPAC Systems, Inc.
%% SHUT DOWN
fprintf('\nDisconnecting...\n')
MpSys.status = calllib(Bhapi.lib, 'disconnectMPDev');
fprintf('Disconnected.\n\n');
end