MAGResWCHDLL |

Loading...
Searching...
No Matches
MAGResWCH.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#ifdef MAGRESWCH_EXPORTS
9#define MAGRESWCH_API __declspec(dllexport)
10#else
11#define MAGRESWCH_API __declspec(dllimport)
12#endif
13
14
15#include <stdint.h>
16
17#ifdef __cplusplus
18 extern "C" {
19#endif
20
22 typedef struct dio_handle_s *dio_handle_h;
23
25 typedef struct dio_bmp_s *dio_bmp_h;
26
28 typedef enum {
30 ERR_CANNOT_ALLOCATE_LPNMASTERHANDLE = -1,
32 ERR_INVALID_CH367_HANDLE = -2,
34 ERR_CANNOT_GET_IO_REG_ADDR = -3,
36 ERR_STEP_SIZE_LESS_EQUAL_ZERO = -4,
38 ERR_WRITE_LONGER_THAN_AVAIL_MEM = -5,
40 ERR_WRITE_ZERO_BYTES = -6,
42 ERR_READ_ZERO_BYTES = -7,
44 ERR_SPI_READ_ERR = -8,
46 ERR_SPI_STREAM_ERR = -9,
48 ERR_SPI_WRITE_ERR = -10,
50 ERR_SPI_ADDR_OUT_OF_BOUNDS = -11,
52 ERR_BMP_INVALID_FILE = -12
53} dio_errors_e;
54
56 typedef enum {
58 DIO_EXT_TRIG_IGNORE = 0,
60 DIO_EXT_TRIG_RISING_EDGE,
62 DIO_EXT_TRIG_FALLING_EDGE,
64 DIO_EXT_TRIG_HIGH_HOLD,
66 DIO_EXT_TRIG_LOW_HOLD
67} dio_ext_trigger_modes_e;
68
69
70 typedef enum {
71 DIO_ADRSR_PIN_LOW = 0,
72 DIO_ADRSR_PIN_HIGH
73} dio_adrsr_pin_state_e;
74
76 typedef enum {
78 DIO_OLED_MODE_OVERWRITE = 0,
80 DIO_OLED_MODE_OR,
82 DIO_OLED_MODE_GREATER_THAN,
84 DIO_OLED_MODE_XOR,
86 DIO_OLED_MODE_NONZERO
87} dio_oled_write_mode_e;
88
89/*
90 typedef enum {
91 DIO_OLED_BUFF_SEND_MODE_FULL = 0, //sends the full buffer
92 DIO_OLED_BUFF_SEND_MODE_DIRTY, //sends the 'dirty area' of the buffer
93 DIO_OLED_BUFF_SEND_MODE_QUAD_1 //divides into quads and sends dirty quad
94} dio_oled_buff_send_mode;
95*/
96
110MAGRESWCH_API void DioInitialize(short nMasterNum, dio_handle_h *lpnMasterHandle, int16_t* lpnStatus);
111
120MAGRESWCH_API void DioArm(dio_handle_h nMasterHandle, int16_t* lpnStatus);
121
131MAGRESWCH_API void DioHalt(dio_handle_h nMasterHandle, int16_t* lpnStatus);
132
142MAGRESWCH_API void DioPause (dio_handle_h nMasterHandle, int16_t* lpnStatus);
143
144
151MAGRESWCH_API void DioTrig(dio_handle_h nMasterHandle,
152 int16_t* lpnStatus);
153
168MAGRESWCH_API void DioReadCtrlMemory (dio_handle_h nHandle,
169 uint32_t* lnpdwVector,
170 uint32_t dwStart,
171 uint32_t dwSize,
172 int16_t* lpnStatus);
173
174
189MAGRESWCH_API void DioReadOutMemory (dio_handle_h nHandle,
190 uint32_t* lnpdwVector,
191 uint32_t dwStart,
192 uint32_t dwSize,
193 int16_t* lpnStatus);
194
195
208MAGRESWCH_API void DioWriteCtrlMemory(dio_handle_h nHandle,
209 uint32_t* lpdwMemory,
210 uint32_t dwStart,
211 uint32_t dwSize,
212 int16_t* lpnStatus);
213
226MAGRESWCH_API void DioWriteOutMemory(dio_handle_h nHandle,
227 uint32_t* lpdwMemory,
228 uint32_t dwStart,
229 uint32_t dwSize,
230 int16_t* lpnStatus);
231
242MAGRESWCH_API void DioReadProgramCounter(dio_handle_h nHandle,
243 int32_t* lpdwCounter,
244 int16_t* lpnStatus);
245
256MAGRESWCH_API void DioWriteProgramCounter(dio_handle_h nHandle,
257 int32_t dwCounter,
258 int16_t* lpnStatus);
259
268MAGRESWCH_API void DioReadCurrentIO(dio_handle_h nHandle,
269 int32_t* lpdwCounter,
270 int16_t* lpnStatus);
271
282MAGRESWCH_API void DioWriteCurrentIO(dio_handle_h nHandle,
283 int32_t dwCounter,
284 int16_t* lpnStatus);
285
286
287
301MAGRESWCH_API void DioReadStatusRegister(dio_handle_h nHandle,
302 int16_t* lpwData,
303 int16_t* lpnStatus);
304
305
306/*
307 * @brief Reads/writes x register from/to the specified board
308 *
309 * called to simulate external event lines value.
310 *
311 * @param nHandle master board handle
312 * @param lpwData returned register value
313 * @param wData value to be written
314 * @param lpnStatus returned status, 0 on success, < 0 failure.
315 */
316/*
317 MAGRESWCH_API void DioReadXRegister(dio_handle_h nHandle,
318 int32_t* lpwData,
319 int16_t* lpnStatus);
320
321 MAGRESWCH_API void DioWriteXRegister(dio_handle_h nHandle,
322 int32_t* wData,
323 int16_t* lpnStatus);
324 */
325
326
333MAGRESWCH_API void DioReset(dio_handle_h nHandle,
334 int16_t* lpnStatus);
335
336/*
337 * @brief Sets up the specified master board external event lines trigger mode
338 *
339 * DioTrig function or the external trigger control line can trigger the board
340 * regardless of the trigger mode set by this function. Board must be in a PAUSE
341 * state to enable triggering.
342 *
343 * @param nHandle master board handle
344 * @param nMode specifies one of several trigger modes
345 * @param lpnStatus returned status, 0 on success, < 0 failure.
346 */
347/*
348 MAGRESWCH_API void DioSetupTriggerMode(dio_handle_h nHandle,
349 int16_t nMode,
350 int16_t* lpnStatus);
351 */
352
353
354/*
355 * @brief Sets up the specified master board external event lines source.
356 *
357 *
358 * @param nMasterHandle master board handle
359 * @param nSource 0 source is external event lines/1 X register
360 * @param lpnStatus returned status, 0 on success, < 0 failure.
361 */
362/*
363 MAGRESWCH_API void DioSetupTriggerXEventSource(dio_handle_h nMasterHandle,
364 int16_t nSource,
365 int16_t* lpnStatus);
366 */
367
380MAGRESWCH_API void DioStep(dio_handle_h nMasterHandle,
381 int32_t dwSteps,
382 int16_t* lpnStatus);
383
392MAGRESWCH_API void DioReadMaxDataLines(dio_handle_h nHandle,
393 int32_t* lpdwCounter,
394 int16_t* lpnStatus);
395
396
403MAGRESWCH_API void DioClearCtrlMemory(dio_handle_h nMasterHandle, int16_t* lpnStatus);
404
411MAGRESWCH_API void DioClearOutMemory(dio_handle_h nMasterHandle, int16_t* lpnStatus);
412
413
431MAGRESWCH_API void DioStreamSPI(dio_handle_h nMasterHandle,
432 uint8_t addr,
433 uint8_t *write_buff,
434 uint8_t *read_buff,
435 size_t len,
436 int16_t* lpnStatus);
437
453MAGRESWCH_API void DioWriteSPI(dio_handle_h nMasterHandle,
454 uint8_t addr,
455 uint8_t *write_buff,
456 size_t len,
457 int16_t* lpnStatus);
458
475MAGRESWCH_API void DioReadSPI(dio_handle_h nMasterHandle,
476 uint8_t addr,
477 uint8_t *read_buff,
478 size_t len,
479 int16_t* lpnStatus);
480
487MAGRESWCH_API void DioResetDDS(dio_handle_h nMasterHandle, int16_t* lpnStatus);
488
506MAGRESWCH_API void DioSetupTriggerMode(dio_handle_h nMasterHandle,
507 uint8_t nPauseMode,
508 uint8_t nRunMode,
509 int16_t* lpnstatus);
510
520MAGRESWCH_API void DioClose(dio_handle_h nMasterHandle, int16_t* lpnStatus);
521
522MAGRESWCH_API void DioSetADRSR_Low(dio_handle_h nMasterHandle, uint8_t io_byte);
523MAGRESWCH_API void DioSetADRSR_High(dio_handle_h nMasterHandle, uint8_t io_byte);
524
533MAGRESWCH_API void DioSetupOLED(dio_handle_h nMasterHandle, int16_t* lpnStatus);
534
535
549MAGRESWCH_API void DioWriteOLEDPixelPairImm(dio_handle_h nMasterHandle, uint8_t column, uint8_t y, uint8_t val);
550
566MAGRESWCH_API void DioWriteOLEDPixelPairBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode,
567 uint8_t column, uint8_t y, uint8_t val);
568
579MAGRESWCH_API void DioWriteOLEDPixelImm(dio_handle_h nMasterHandle, uint8_t row, uint8_t column, uint8_t val);
580
593MAGRESWCH_API void DioWriteOLEDPixelBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode,
594 uint8_t x, uint8_t y, uint8_t val);
595
612MAGRESWCH_API void DioWriteOLEDLineImm(dio_handle_h nMasterHandle,
613 uint8_t x1,
614 uint8_t y1,
615 uint8_t x2,
616 uint8_t y2,
617 uint8_t val1,
618 uint8_t val2);
619
620
638MAGRESWCH_API void DioWriteOLEDLineBuff(dio_handle_h nMasterHandle,
639 dio_oled_write_mode_e mode,
640 uint8_t x1,
641 uint8_t y1,
642 uint8_t x2,
643 uint8_t y2,
644 uint8_t val1,
645 uint8_t val2);
646
662MAGRESWCH_API void DioWriteOLEDArrImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y, uint8_t *arr, size_t len);
663
664
681MAGRESWCH_API void DioWriteOLEDArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode,
682 uint8_t x, uint8_t y, uint8_t *arr, size_t len);
683
695MAGRESWCH_API void DioWriteOLEDScreenArrImm(dio_handle_h nMasterHandle, uint8_t *arr);
696
709MAGRESWCH_API void DioWriteOLEDScreenArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e
710 mode, uint8_t *arr);
711
712
722MAGRESWCH_API void DioWriteOLEDRowArrImm(dio_handle_h nMasterHandle, uint8_t y, uint8_t *arr);
723
724
734MAGRESWCH_API void DioWriteOLEDRowArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode,
735 uint8_t y, uint8_t *arr);
736
746MAGRESWCH_API void DioWriteOLEDRowValImm(dio_handle_h nMasterHandle, uint8_t y, uint8_t val);
747
767MAGRESWCH_API void DioWriteOLEDAreaArrImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y,
768 uint8_t col_width, uint8_t height, uint8_t *arr);
769
789MAGRESWCH_API void DioWriteOLEDAreaArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e
790 mode, uint8_t x, uint8_t y,
791 uint8_t col_width, uint8_t height,
792 uint8_t *arr);
793
803MAGRESWCH_API void DioWriteOLED2DUnpackedArrImm(dio_handle_h nMasterHandle, uint8_t **arr);
804
810MAGRESWCH_API void DioSendOLEDBuff(dio_handle_h nMasterHandle);
811
817MAGRESWCH_API void DioClearOLEDBuff(dio_handle_h nMasterHandle);
818
824MAGRESWCH_API void DIOClearOLEDImm(dio_handle_h nMasterHandle);
825
834MAGRESWCH_API dio_bmp_h DioOpenBMP(dio_handle_h nMasterHandle, char *path, int16_t *lpnStatus);
835
836
843MAGRESWCH_API void DioCloseBMP(dio_handle_h nMasterHandle,
844 dio_bmp_h *bmp_handle);
845
846
858MAGRESWCH_API void DioWriteOLEDAreaBMPImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y,
859 dio_bmp_h bmp_handle);
860
873MAGRESWCH_API void DioWriteOLEDAreaBMPBuff(dio_handle_h nMasterHandle,
874 dio_oled_write_mode_e mode, uint8_t x, uint8_t y, dio_bmp_h bmp_handle);
875
884MAGRESWCH_API void DioWriteOLEDCharImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y, char letter);
885
886
895MAGRESWCH_API void DioWriteOLEDCharBuff(dio_handle_h nMasterHandle,
896 dio_oled_write_mode_e mode,
897 uint8_t x, uint8_t y,
898 char letter);
899
900
909MAGRESWCH_API void DioWriteOLEDStrImm(dio_handle_h nMasterHandle,
910 uint8_t x, uint8_t y,
911 char* str);
912
921MAGRESWCH_API void DioWriteOLEDStrBuff(dio_handle_h nMasterHandle,
922 dio_oled_write_mode_e mode,
923 uint8_t x, uint8_t y,
924 char* str);
925
933MAGRESWCH_API const char* DioGetErrorStr(dio_handle_h nMasterHandle, int16_t lpnStatus);
934
935#ifdef __cplusplus
936}
937#endif
DioWriteOLEDPixelPairImm
MAGRESWCH_API void DioWriteOLEDPixelPairImm(dio_handle_h nMasterHandle, uint8_t column, uint8_t y, uint8_t val)
Writes a value to a pair of pixels immediately.
DioReadProgramCounter
MAGRESWCH_API void DioReadProgramCounter(dio_handle_h nHandle, int32_t *lpdwCounter, int16_t *lpnStatus)
Returns the specified master board program counter value.
DioArm
MAGRESWCH_API void DioArm(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Changes the board state from Halt to Pause.
dio_ext_trigger_modes_e
dio_ext_trigger_modes_e
External Trigger modes.
Definition MAGResWCH.h:56
DIO_EXT_TRIG_IGNORE
@ DIO_EXT_TRIG_IGNORE
Ignore the external trigger line.
Definition MAGResWCH.h:58
DIO_EXT_TRIG_LOW_HOLD
@ DIO_EXT_TRIG_LOW_HOLD
Trigger and change state when the line is held low.
Definition MAGResWCH.h:66
DIO_EXT_TRIG_HIGH_HOLD
@ DIO_EXT_TRIG_HIGH_HOLD
Trigger and change state when the line is held high.
Definition MAGResWCH.h:64
DIO_EXT_TRIG_RISING_EDGE
@ DIO_EXT_TRIG_RISING_EDGE
Trigger and change state on the rising edge.
Definition MAGResWCH.h:60
DIO_EXT_TRIG_FALLING_EDGE
@ DIO_EXT_TRIG_FALLING_EDGE
Trigger and change state on the falling edge.
Definition MAGResWCH.h:62
DioClearOutMemory
MAGRESWCH_API void DioClearOutMemory(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Clears the output memory on the board.
DioWriteSPI
MAGRESWCH_API void DioWriteSPI(dio_handle_h nMasterHandle, uint8_t addr, uint8_t *write_buff, size_t len, int16_t *lpnStatus)
Writes to the SPI.
DioWriteOLEDStrImm
MAGRESWCH_API void DioWriteOLEDStrImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y, char *str)
Writes a string immediately to the screen.
DioWriteOLEDAreaArrImm
MAGRESWCH_API void DioWriteOLEDAreaArrImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y, uint8_t col_width, uint8_t height, uint8_t *arr)
Writes an array of length col_width*height to the screen immediately.
DioClearCtrlMemory
MAGRESWCH_API void DioClearCtrlMemory(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Clears the control memory on the board.
DioReadSPI
MAGRESWCH_API void DioReadSPI(dio_handle_h nMasterHandle, uint8_t addr, uint8_t *read_buff, size_t len, int16_t *lpnStatus)
Reads the SPI.
dio_errors_e
dio_errors_e
Errors represented by lpnStatus.
Definition MAGResWCH.h:28
ERR_SPI_WRITE_ERR
@ ERR_SPI_WRITE_ERR
Cannot write to the SPI.
Definition MAGResWCH.h:48
ERR_SPI_ADDR_OUT_OF_BOUNDS
@ ERR_SPI_ADDR_OUT_OF_BOUNDS
Tried to access an invalid SPI address.
Definition MAGResWCH.h:50
ERR_BMP_INVALID_FILE
@ ERR_BMP_INVALID_FILE
Tried to open invalid BMP file.
Definition MAGResWCH.h:52
ERR_STEP_SIZE_LESS_EQUAL_ZERO
@ ERR_STEP_SIZE_LESS_EQUAL_ZERO
Commanded step size is less than or equal to zero.
Definition MAGResWCH.h:36
ERR_SPI_READ_ERR
@ ERR_SPI_READ_ERR
Cannot read SPI.
Definition MAGResWCH.h:44
ERR_READ_ZERO_BYTES
@ ERR_READ_ZERO_BYTES
Number of bytes to read is specified to be zero, needs to be at least 1.
Definition MAGResWCH.h:42
ERR_CANNOT_GET_IO_REG_ADDR
@ ERR_CANNOT_GET_IO_REG_ADDR
Cannot get io_reg address for the CH367.
Definition MAGResWCH.h:34
ERR_SPI_STREAM_ERR
@ ERR_SPI_STREAM_ERR
Cannot stream SPI.
Definition MAGResWCH.h:46
ERR_INVALID_CH367_HANDLE
@ ERR_INVALID_CH367_HANDLE
Invalid CH367 handle returned.
Definition MAGResWCH.h:32
ERR_WRITE_LONGER_THAN_AVAIL_MEM
@ ERR_WRITE_LONGER_THAN_AVAIL_MEM
Number of bytes to write is larger than available memory.
Definition MAGResWCH.h:38
ERR_CANNOT_ALLOCATE_LPNMASTERHANDLE
@ ERR_CANNOT_ALLOCATE_LPNMASTERHANDLE
Cannot allocate lpnMasterHandle.
Definition MAGResWCH.h:30
ERR_WRITE_ZERO_BYTES
@ ERR_WRITE_ZERO_BYTES
Number of bytes to write is zero, needs to be at least 1.
Definition MAGResWCH.h:40
DioWriteOLEDRowArrBuff
MAGRESWCH_API void DioWriteOLEDRowArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t y, uint8_t *arr)
Writes an array of length 128 to a row in the local screen buffer.
DioWriteOLEDArrImm
MAGRESWCH_API void DioWriteOLEDArrImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y, uint8_t *arr, size_t len)
Writes an array of length len to screen immediately.
DioWriteOLEDRowArrImm
MAGRESWCH_API void DioWriteOLEDRowArrImm(dio_handle_h nMasterHandle, uint8_t y, uint8_t *arr)
Writes an array of length 128 to a row on screen immediately.
DioCloseBMP
MAGRESWCH_API void DioCloseBMP(dio_handle_h nMasterHandle, dio_bmp_h *bmp_handle)
Closes and deallocates memory for a bitmap file.
DioWriteOLEDLineImm
MAGRESWCH_API void DioWriteOLEDLineImm(dio_handle_h nMasterHandle, uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t val1, uint8_t val2)
Immediately writes a line to the screen that begins at (x1, y1), with value val1, to (x2,...
DioWriteOLEDLineBuff
MAGRESWCH_API void DioWriteOLEDLineBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t val1, uint8_t val2)
Writes a line to the local screen buffer that begins at (x1, y1), with value val1,...
DioWriteOLEDCharImm
MAGRESWCH_API void DioWriteOLEDCharImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y, char letter)
Writes a single character immediately to the screen.
DioReadCtrlMemory
MAGRESWCH_API void DioReadCtrlMemory(dio_handle_h nHandle, uint32_t *lnpdwVector, uint32_t dwStart, uint32_t dwSize, int16_t *lpnStatus)
Reads a block of control memory from the specified board.
DioSendOLEDBuff
MAGRESWCH_API void DioSendOLEDBuff(dio_handle_h nMasterHandle)
Sends the current local screen buffer to the OLED screen.
DioReadOutMemory
MAGRESWCH_API void DioReadOutMemory(dio_handle_h nHandle, uint32_t *lnpdwVector, uint32_t dwStart, uint32_t dwSize, int16_t *lpnStatus)
Reads a block of output memory from the specified board.
DioOpenBMP
MAGRESWCH_API dio_bmp_h DioOpenBMP(dio_handle_h nMasterHandle, char *path, int16_t *lpnStatus)
Opens and allocates memory for a bitmap file.
DioWriteOLEDCharBuff
MAGRESWCH_API void DioWriteOLEDCharBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t x, uint8_t y, char letter)
Writes a single character to the local screen buffer.
DioWriteOLEDRowValImm
MAGRESWCH_API void DioWriteOLEDRowValImm(dio_handle_h nMasterHandle, uint8_t y, uint8_t val)
Writes singular value to a row on screen immediately.
DioWriteCurrentIO
MAGRESWCH_API void DioWriteCurrentIO(dio_handle_h nHandle, int32_t dwCounter, int16_t *lpnStatus)
Writes the specified master board current output value.
DioReadCurrentIO
MAGRESWCH_API void DioReadCurrentIO(dio_handle_h nHandle, int32_t *lpdwCounter, int16_t *lpnStatus)
Returns the specified master board current output value.
DioSetupTriggerMode
MAGRESWCH_API void DioSetupTriggerMode(dio_handle_h nMasterHandle, uint8_t nPauseMode, uint8_t nRunMode, int16_t *lpnstatus)
Sets the external trigger mode during the PAUSE and RUN states.
DioWriteOLEDPixelPairBuff
MAGRESWCH_API void DioWriteOLEDPixelPairBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t column, uint8_t y, uint8_t val)
Writes a value to a pair of pixels in the local screen buffer.
DioStreamSPI
MAGRESWCH_API void DioStreamSPI(dio_handle_h nMasterHandle, uint8_t addr, uint8_t *write_buff, uint8_t *read_buff, size_t len, int16_t *lpnStatus)
Streams the SPI.
DioHalt
MAGRESWCH_API void DioHalt(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Changes specified master board state to HALT.
dio_oled_write_mode_e
dio_oled_write_mode_e
Pixel blending modes when using the OLED screen buffer.
Definition MAGResWCH.h:76
DIO_OLED_MODE_OR
@ DIO_OLED_MODE_OR
Or current pixel with new pixel value.
Definition MAGResWCH.h:80
DIO_OLED_MODE_XOR
@ DIO_OLED_MODE_XOR
Xor current pixel with new pixel value.
Definition MAGResWCH.h:84
DIO_OLED_MODE_NONZERO
@ DIO_OLED_MODE_NONZERO
Overwrite current pixel with new pixel value as long as the new value is nonzero.
Definition MAGResWCH.h:86
DIO_OLED_MODE_GREATER_THAN
@ DIO_OLED_MODE_GREATER_THAN
Overwrite current pixel if new pixel is greater than existing pixel.
Definition MAGResWCH.h:82
DIO_OLED_MODE_OVERWRITE
@ DIO_OLED_MODE_OVERWRITE
Overwrites what's there.
Definition MAGResWCH.h:78
DioWriteOLEDScreenArrImm
MAGRESWCH_API void DioWriteOLEDScreenArrImm(dio_handle_h nMasterHandle, uint8_t *arr)
Writes 128x64 bytes to the screen at once, given a single dimensional array of that size.
DioWriteOLEDAreaArrBuff
MAGRESWCH_API void DioWriteOLEDAreaArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t x, uint8_t y, uint8_t col_width, uint8_t height, uint8_t *arr)
Writes an array of length col_width*height to the local screen buffer.
DioClose
MAGRESWCH_API void DioClose(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Closes the connection to the board, and releases the handle from being used.
dio_bmp_h
struct dio_bmp_s * dio_bmp_h
The handle for a bmp file.
Definition MAGResWCH.h:25
DioWriteOutMemory
MAGRESWCH_API void DioWriteOutMemory(dio_handle_h nHandle, uint32_t *lpdwMemory, uint32_t dwStart, uint32_t dwSize, int16_t *lpnStatus)
Writes a block of data to the output memory of the specified board.
DioTrig
MAGRESWCH_API void DioTrig(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Takes the specified master board state from PAUSE to RUN.
DioInitialize
MAGRESWCH_API void DioInitialize(short nMasterNum, dio_handle_h *lpnMasterHandle, int16_t *lpnStatus)
Provides a one time initialization of a master board and all slave boards associated with it.
DioWriteOLEDArrBuff
MAGRESWCH_API void DioWriteOLEDArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t x, uint8_t y, uint8_t *arr, size_t len)
Writes an array of length len to the local screen buffer.
DioClearOLEDBuff
MAGRESWCH_API void DioClearOLEDBuff(dio_handle_h nMasterHandle)
Clears the current local screen buffer.
DioResetDDS
MAGRESWCH_API void DioResetDDS(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Resets and initializes the DDS. Can only be sent during HALT.
DioStep
MAGRESWCH_API void DioStep(dio_handle_h nMasterHandle, int32_t dwSteps, int16_t *lpnStatus)
Executes the specified master board program for a number of steps.
DioWriteOLEDPixelImm
MAGRESWCH_API void DioWriteOLEDPixelImm(dio_handle_h nMasterHandle, uint8_t row, uint8_t column, uint8_t val)
Writes a pixel to the screen at the designated coordinate immediately.
DioReadStatusRegister
MAGRESWCH_API void DioReadStatusRegister(dio_handle_h nHandle, int16_t *lpwData, int16_t *lpnStatus)
Reads the status register from the specified board.
DioReset
MAGRESWCH_API void DioReset(dio_handle_h nHandle, int16_t *lpnStatus)
Changes state of specified master board to HALT.
DioGetErrorStr
MAGRESWCH_API const char * DioGetErrorStr(dio_handle_h nMasterHandle, int16_t lpnStatus)
Returns a null-terminated string associated with an lpnStatus error.
DioWriteOLED2DUnpackedArrImm
MAGRESWCH_API void DioWriteOLED2DUnpackedArrImm(dio_handle_h nMasterHandle, uint8_t **arr)
Writes 128x64 bytes to the screen at once, given a single dimensional array of that size.
DioSetupOLED
MAGRESWCH_API void DioSetupOLED(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Sets up and turns on the OLED.
DIOClearOLEDImm
MAGRESWCH_API void DIOClearOLEDImm(dio_handle_h nMasterHandle)
Clears the screen immediately.
DioWriteOLEDPixelBuff
MAGRESWCH_API void DioWriteOLEDPixelBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t x, uint8_t y, uint8_t val)
Writes a pixel to the screen at the designated coordinate in the local screen buffer.
DioWriteProgramCounter
MAGRESWCH_API void DioWriteProgramCounter(dio_handle_h nHandle, int32_t dwCounter, int16_t *lpnStatus)
Writes the specified master board program counter value.
DioReadMaxDataLines
MAGRESWCH_API void DioReadMaxDataLines(dio_handle_h nHandle, int32_t *lpdwCounter, int16_t *lpnStatus)
Returns the specified master board max data lines available to program.
DioWriteOLEDAreaBMPBuff
MAGRESWCH_API void DioWriteOLEDAreaBMPBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t x, uint8_t y, dio_bmp_h bmp_handle)
Writes a BMP to the local screen buffer at an x and y offset.
DioWriteOLEDScreenArrBuff
MAGRESWCH_API void DioWriteOLEDScreenArrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t *arr)
Writes 128x64 bytes to the local screen buffer, given a single dimensional array of that size.
DioWriteOLEDStrBuff
MAGRESWCH_API void DioWriteOLEDStrBuff(dio_handle_h nMasterHandle, dio_oled_write_mode_e mode, uint8_t x, uint8_t y, char *str)
Writes a string to the local screen buffer.
DioWriteOLEDAreaBMPImm
MAGRESWCH_API void DioWriteOLEDAreaBMPImm(dio_handle_h nMasterHandle, uint8_t x, uint8_t y, dio_bmp_h bmp_handle)
Writes a BMP to the screen immediately at an x and y offset.
dio_handle_h
struct dio_handle_s * dio_handle_h
The board handle.
Definition MAGResWCH.h:22
DioPause
MAGRESWCH_API void DioPause(dio_handle_h nMasterHandle, int16_t *lpnStatus)
Changes the specified master board state from a RUN to PAUSE state.
DioWriteCtrlMemory
MAGRESWCH_API void DioWriteCtrlMemory(dio_handle_h nHandle, uint32_t *lpdwMemory, uint32_t dwStart, uint32_t dwSize, int16_t *lpnStatus)
Writes a block of data to the control memory of the specified board.