/*---------------------------------------------------------------------------------------------------------*/
/* */
/* Copyright(c) 2019 Nuvoton Technology Corp. All rights reserved. */
/* */
/*---------------------------------------------------------------------------------------------------------*/
//***********************************************************************************************************
// Website: http://www.nuvoton.com
// E-Mail : MicroC-8bit@nuvoton.com
//***********************************************************************************************************
//***********************************************************************************************************
// File Function: ML51 simple GPIO toggle out demo code
//***********************************************************************************************************
#include "ML51.h"
/**
* [url=home.php?mod=space&uid=247401]@brief[/url] Clock output enable
* @param None
* [url=home.php?mod=space&uid=266161]@return[/url] None
* [url=home.php?mod=space&uid=1543424]@Details[/url] P3.2 / P4.6 / P5.6 can be setting as clock out function.
*/
void main (void)
{
/* Setting P3.2 or P4.6 or P5.6 Multi function pin setting for GPIO clock out toggle
* include gipo.c in Common for GPIO mode setting
*/
MFP_P32_GPIO;
P32_PUSHPULL_MODE;
MFP_P46_GPIO;
P46_PUSHPULL_MODE;
MFP_P56_GPIO;
P56_PUSHPULL_MODE;
/*
Clock out enable setting
*/
set_CKCON_CLOEN;
while(1); //check the pin setting as clock output.
}
|