O'Reilly logo

ARM® Cortex® M4 Cookbook by Dr. Mark Fisher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing a C program to blink each LED in turn

This recipe extends the helloBlinky_c2v0 recipe introduced in the previous section, and includes a few more C programming statements. We'll call our new recipe helloBlinky_c2v1. uVision5's IDE features a so-called folding editor that allows blocks of code and comments to be hidden or expanded. This is quite useful for hiding complexity, allowing us to focus on the important details.

Getting ready…

First, we'll draw a flowchart describing what our program will do. Don't worry about the details at this stage, we just need to describe the behavior. A flowchart describing helloBlinky_c2v1 is shown as follows:

Our program will need to change the value of a number stored in memory that determines the LED that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required