#include <stdint.h>#include <stdbool.h>#include "inc/hw_memmap.h"#include "driverlib/gpio.h"#include "driverlib/rom.h"#include "driverlib/rom_map.h"#include "driverlib/sysctl.h"intmain(void){uint32_tg_ui32SysClock;// Fonctionnement sur PLL à 120 MHz.g_ui32SysClock=MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ|// fréquence de l'oscillateurSYSCTL_OSC_MAIN|// oscillateur externe (quartz)SYSCTL_USE_PLL|// sortie PLL comme sysclockSYSCTL_CFG_VCO_480),// PLL VCO output á 480-MHz120000000);// freq demandée// Activation du module GPIO port NMAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);// Configuration de PN1 en sortieMAP_GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE,GPIO_PIN_1);while(1){// Active la ledMAP_GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN_1,GPIO_PIN_1);// délai MAP_SysCtlDelay(g_ui32SysClock/3);// Désactive la ledMAP_GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN_1,0);// délaiMAP_SysCtlDelay(g_ui32SysClock/3);}}
SW-EK-TM4C1294XL Hackable :
intled=13;voidsetup(){// initialize the digital pin as an output.pinMode(led,OUTPUT);}voidloop(){digitalWrite(led,HIGH);// turn the LED on (HIGH is the voltage level)delay(1000);// wait for a seconddigitalWrite(led,LOW);delay(1000);}
[^] # Re: numéro 5
Posté par Denis Bodor (site web personnel) . En réponse à la dépêche Revue de presse — mars 2015. Évalué à 9.
Pour résumer :
SW-EK-TM4C1294XL Open Silicium :
SW-EK-TM4C1294XL Hackable :