-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathapi_reset.m
21 lines (15 loc) · 891 Bytes
/
api_reset.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%%ALP Basic API, Written by Nakul Bende%%
%%%%api_reset%%%%
% Reset the DMD device to load another image. Should be performed before any clear function. The reset operation itself takes thesame time to finish, independent of how many mirrors are affected.
% INPUTS:
% _dll_name_ = Loaded control library
% _hdevice_ = device handle generated by allocate function
% _reset_mode_ = first block to be cleared Pg. 22 of API guide, -1:single -2:pair -3:quad -4:global
% _reset_address_ = address of block to be reset (0 for global), see
% guide for others
% OUTPUT:
% _return_reset_ = Return for success/ error reporting
function [return_reset] = api_reset(dll_name, hdevice, reset_mode, reset_address)
reset_mode = int32(reset_mode);
reset_address = int32(reset_address);
[return_reset] = calllib(dll_name, 'AlpbDevReset', hdevice, reset_mode, reset_address);