HWA
Bare metal programming with style
hwa/st/stm32/examples/01-2-blink/main.c
Blink a LED using a software loop

This is a variation of the 01-1-blink program using the hwa() instructions.

Symbols:

main.c
/* This file is part of the HWA project.
* Copyright (c) 2017 Christophe Duparquet.
* All rights reserved. Read LICENSE.TXT for details.
*/
#include BOARD_H
#define PERIOD 0.5
int main ( )
{
hwa( begin, reset );
hwa( power, (LED1,port), on );
hwa( configure, LED1,
mode, digital_output,
frequency, lowest );
hwa( commit );
for(;;) {
hwa( write, LED1, 1 );
hwa( commit );
hwa( write, LED1, 0 );
hwa( commit );
}
}
hwa
#define hwa(...)
hwa( action, object [,...] ) stores an action for an object into a HWA context.
Definition: hwa_macros.h:552
HW_DEVICE_HSIHZ
#define HW_DEVICE_HSIHZ
Definition: stm32f103.h:82
LED1
#define LED1
X.
Definition: bluepill.h:56
hw_waste_cycles
#define hw_waste_cycles(n)
Definition: hwa_2.h:98