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, (LED,port), on );
hwa( configure, LED,
mode, digital_output,
frequency, lowest );
hwa( commit );
for(;;) {
hwa( write, LED, 1 );
hwa( commit );
hwa( write, LED, 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
LED
#define LED
X.
Definition: bluepill.h:55
hw_waste_cycles
#define hw_waste_cycles(n)
Definition: hwa_2.h:98