Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 6 of 19

PDT 3200 Run-Time Library Reference Manual: Chapter 2 Function Reference, pages 39 to 48

Pages 39 to 48 of 168, from PDT 3200 Run-Time Library Reference Manual

The original document is the PDF (949 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Symbol PDT-3200

Page 39

Chapter 2: Function Reference

BIOS_ApmLowSpeed p_bios.h Syntax UCHAR BIOS_ApmLowSpeed(UCHAR ClockSpeed);

Description Sets the low-speed PLL clock frequency. Note that the CPU internal speed is half of the low-speed PLL. Only the low-speed PLL is affected, not the high-speed PLL.

Parameters ClockSpeed

Indicates the speed of the clock in low-speed mode. APM_CLK_9MHZ sets clock speed to 9.216 MHz and internal CPU speed to 4.608 MHz. APM_CLK_4MHZ sets clock speed to 4.608 MHz and internal CPU speed to 2.304 MHz. APM_CLK_2MHZ sets clock speed to 2.304 MHz and internal CPU speed to 1.152 MHz. APM_CLK_1MHZ sets clock speed to 1.152 MHz and internal CPU speed to 0.576 MHz.

Returns APM_ERR_NONE APM_ERR_OUTOFRANGE APM_ERR_UNKNOWN

No error. ClockSpeed parameter is out of range. Unknown error.

Sample See BIOS_ApmAudioBLI.

2-11

Page 40

PDT 3200 Run-Time Library Reference Manual

BIOS_ApmSleepDisable p_bios.h Syntax UCHAR BIOS_ApmSleepDisable(void);

Description Forces the CPU to remain on. Call this function before entering a CPU-intensive task. When the task is complete, BIOS_ApmSleepEnable() should be called to allow the unit to continue conserving power. Be very careful when using BIOS_ApmSleepDisable(); it can have a severe impact on battery life.

Parameters None.

Returns APM_ERR_NONE APM_ERR_UNKNOWN

CPU will remain on. Unknown error.

Sample #include <stdio.h> #include "p_bios.h" void SleepDisabled(void) { UCHAR scanCode; UCHAR ch; // Disable sleep mode in anticipation of CPU // intensive task BIOS_ApmSleepDisable(); BIOS_ClearScreen(P_ATT_NORM); printf ("Sleep Disabled\n"); printf (" < Hit any key > "); while (!BIOS_GetKeyStatus(&scanCode, &ch)); BIOS_KeyboardReadChar(&scanCode); // CPU intensive code here // IMPORTANT: Enable sleep mode so unit can // maximize power conservation.

2-12

Page 41

Chapter 2: Function Reference

BIOS_ApmSleepEnable(); BIOS_ClearScreen(P_ATT_NORM); printf ("\nSleep Enabled\n"); printf (" < Hit any key > "); while (!BIOS_GetKeyStatus(&scanCode, &ch)); BIOS_KeyboardReadChar(&scanCode); return; }

2-13

Page 42

PDT 3200 Run-Time Library Reference Manual

BIOS_ApmSleepEnable p_bios.h Syntax UCHAR BIOS_ApmSleepEnable(void);

Description Enables the ability of the unit to shut off the CPU for power conservation. This is the default state of the unit. Do not call this function unless the capability has been disabled with BIOS_ApmSleepDisable().

Parameters None.

Returns APM_ERR_NONE APM_ERR_UNKNOWN

Sample See BIOS_ApmSleepDisable.

2-14

CPU may now turn off. Unknown error.

Page 43

Chapter 2: Function Reference

BIOS_ApmTimeout p_bios.h Syntax UCHAR BIOS_ApmTimeout(UINT Timeout);

Description Sets the auto timeout value, in seconds, for the unit. After Timeout seconds with no activity, the unit will turn off.

Parameters Timeout

The time, in seconds, that the unit should remain on with no activity. Valid range is 16 to 1032 seconds (17 minutes, 12 seconds). 0 (zero) disables the timer, and the unit does not timeout. 300 seconds (5 minutes) is the default timeout period. The resolution is to 4-second intervals, and so the value entered is rounded down to the nearest multiple of 4. For example, values of 17, 18, or 19 produce a 16-second timeout.

Returns APM_ERR_NONE APM_ERR_OUTOFRANGE APM_ERR_UNKNOWN

No error. Timeout parameter is out of range. Unknown error.

Sample See BIOS_ApmAudioBLI.

2-15

Page 44

PDT 3200 Run-Time Library Reference Manual

BIOS_ApmTimerInfo p_bios.h Syntax UCHAR BIOS_ApmTimerInfo(UINT *Auto_Off, UCHAR *Backlight, UCHAR *Audio_BLI);

Description Returns power management timer settings.

Parameters None.

Returns Auto_Off Backlight Audio_BLI APM_ERR_NONE APM_ERR_UNKNOWN

Sample See BIOS_ApmAudioBLI.

2-16

Auto-off timeout in seconds. Backlight auto-off timeout in seconds. Audio battery-low indicator frequency in minutes. No error. Unknown error.

Page 45

Chapter 2: Function Reference

BIOS_ClearScreen p_bios.h Syntax void BIOS_ClearScreen(UINT Attrib);

Description Clears the logical display screen, Þlling the cleared area with the speciÞed attribute. Repositions the cursor to the top of the screen. This is the equivalent of executing CLS from a DOS prompt. The screen width used by this routine is the same as that returned by BIOS_GetVideoColumns(). The screen length used is the same as that returned in the LastRow parameter of BIOS_GetFontInfo().

Parameters Screen attribute that is to be written to the screen as the screen is being cleared. P_ATT_NORM speciÞes a normal white-on-black display attribute. P_ATT_INVERSE speciÞes a reverse-video (black-on-white) display attribute.

Attrib

Returns None.

Sample #include <stdio.h> #include "p_bios.h" void ClearDisplayFunctions (void) { char Key; // Enable horizontal and vertical panning // so we can look at what is cleared BIOS_SetViewportMode (P_VIEWPT_HPAN | P_VIEWPT_VPAN); // Fill and perform BIOS_ClearScreen // Clears entire logical screen FillScreen(); BIOS_ClearScreen(P_ATT_NORM);

2-17

Page 46

PDT 3200 Run-Time Library Reference Manual scanf ("%c", &Key); // Fill and perform BIOS_ClearViewport // Clears only viewport. Panning down or right // will reveal text outside of viewport FillScreen(); BIOS_ClearViewport(P_ATT_NORM); scanf ("%c", &Key); // Fill and perform BIOS_ClearWindow // Clear a square in the middle of the screen // viewport FillScreen(); BIOS_ClearWindow(P_ATT_NORM, 2, 5, 5, 15); scanf ("%c", &Key); } void FillScreen (void) { UINT BotRow, RgtCol; UINT CharWidth; UINT CharHeight; UCHAR far *FontTable; int i, j; char str[81]; char Key; // Use GetFontInfo and GetVideoColumns to determine screen size. BIOS_ClearScreen(P_ATT_NORM); BIOS_GetFontInfo(P_ACT_FONT, &CharWidth, &CharHeight, &BotRow, &FontTable); RgtCol = BIOS_GetVideoColumns(); // Fill screen with varying text on each line for (i=0; i<=BotRow; i++) { for (j=0; j<RgtCol-1; j++) str[j] = 65+i+j; str[RgtCol-1] = '\0'; BIOS_WriteStrXY (i, 0, str); if (i < BotRow) printf ("\n"); } // Reset cursor to top left BIOS_SetCurXY(0,0); scanf ("%c", &Key); }

2-18

Page 47

Chapter 2: Function Reference

BIOS_ClearViewport p_bios.h Syntax void BIOS_ClearViewport(UINT Attrib);

Description Clears the physical viewport, Þlling the cleared area with the given screen attribute. The viewport size used by this routine is the same as that returned by BIOS_GetViewportSize().

Parameters Attrib

Screen attribute that is to be written as the viewport is being cleared. P_ATT_NORM speciÞes a normal white-on-black display attribute. P_ATT_INVERSE speciÞes a reverse-video (black-on-white) display attribute.

Returns None.

Sample See BIOS_ClearScreen().

2-19

Page 48

PDT 3200 Run-Time Library Reference Manual

BIOS_ClearWindow p_bios.h Syntax void BIOS_ClearWindow(UINT Attrib, UINT TRow, UINT LCol, UINT BRow, UINT RCol);

Description Clears the window speciÞed, Þlling the cleared area with the given screen attribute.

Parameters Attrib

TRow LCol BRow RCol Note:

Screen attribute that is to be written as the viewport is being cleared. P_ATT_NORM speciÞes a normal white-on-black display attribute. P_ATT_INVERSE speciÞes a reverse-video (black-on-white) display attribute. Upper row of the region to be cleared. Left column of the region to be cleared. Lower row of the region to be cleared. Right column of the region to be cleared. The row and column numberings both begin at 0.

Returns None.

Sample See BIOS_ClearScreen().

2-20