Wiki Home >> SIO-Command-$CB-Base64-Decode-Compute

SIO-Command-$CB-Base64-Decode-Compute


This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).

Base64 Decode Compute ($CB)

Description

Takes the data that was input by Base64 Decode Input, and encodes it with the Base64 algorithm. The result is put in the output buffer, so that Base64 Decode Length can be used to get the output buffer length, and Base64 Decode Output can be used to retrieve the output.

Firmware version required: 1.1 (2023.08.22) +

Parameters

DCBValue
DDEVIC$70
DUNIT$01
DCOMND$CB
DSTATS$00
DBUFNULL
DTIMLO$03
DBYT0
DAUX10
DAUX20

Examples

CC65

unsigned char base64_decode_compute(void)                                                                                            
{                                                                                                                                    
  OS.dcb.ddevic   = BASE64_DEVICE;                                                                                                   
  OS.dcb.dunit    = 1;                                                                                                               
  OS.dcb.dcomnd   = 0xCB;                                                                                                            
  OS.dcb.dstats   = 0x00;                                                                                                            
  OS.dcb.dbuf     = NULL;                                                                                                            
  OS.dcb.dtimlo   = BASE64_TIMEOUT;                                                                                                  
  OS.dcb.dbyt     = 0;                                                                                                               
  OS.dcb.daux     = 0;                                                                                                               
  siov();                                                                                                                            
                                                                                                                                     
  return OS.dcb.dstats; // Return SIO error or success.                                                                              
}                                                                                                                                    

Wiki content is mirrored from the FujiNet Github Wiki