This function sets the resume function.

Syntax

unsigned int UseResume(
  int mode
);

Parameters

mode
[in] Specifies the resume mode.
Value Description
ENABLE Enable resume function.
DISABLE Disable resume functio.
CURRENT_MODE Returns the current setting.

Return value

Returns the changed setting.
Value Description
ENABLE Enable resume function.
DISABLE isable resume functio.

Remarks

Enables/ Disablethe resume function.

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Sample

#include <stdio.h>
#include "lib.h"

void main(void)
{
    int c;
    int ret;
    printf("\f UseResume example");
    for(;;)
    {
        if ((c=getchar())!=EOF)
        {
            switch(c)
            {
 
            case Q1_KEY:
                ret = UseResume (ENABLE);
                printf("\f UseResume(ENABLE) \r\n = %d" ,ret);
                break;
            case Q2_KEY:
                ret = UseResume (DISABLE);
                printf("\f UseResume(DISABLE) \r\n = %d" ,ret);
                break;
            case SCAN_KEY:
                ret = UseResume (CURRENT_MODE);
                printf("\f UseResume(CURRENT \r\n_MODE)\r\n = %d" ,ret);
                break;
            default:
                break;
            }
        }
        Idle();
    }
}

Last updated: 2022/03/09