JSAPI for STM32F0xx MCU  1.10
jsapi_common.h File Reference

This file contains JSAPI functions and classes that are common to all Cortex-based MCU. DO NOT include this include explicitly. It is included by jsapi.h. More...

#include <stdbool.h>
#include <stdio.h>

Go to the source code of this file.

Classes

class  JSAPI_CORTEX_CORE
 Cortex core features. More...
 

Macros

#define BIT(n)   (1 << (n))
 macro to convert a bit # into a bitmask
 

Enumerations

enum  FLOW_CONTROL { FC_NONE, FC_HARDWARE, FC_SOFTWARE }
 USART flow control. More...
 
enum  usart_mode { MODE_NORMAL, MODE_INTERRUPT }
 USART operating mode. More...
 
enum  SYSTICK_GRANULARITY { SYSTICK_10MICROSECOND, SYSTICK_100MICROSECOND, SYSTICK_MILLISECOND, SYSTICK_HUNDREDTHSECOND }
 

Functions

const char * JSAPI_Revision (void)
 Return the revision of the JSAPI library. More...
 
void Delay10MicroSecs (unsigned delay)
 Delay for "delay" x 10 microseconds. More...
 
void Delay100MicroSecs (unsigned delay)
 Delay for "delay" x 100 microseconds. More...
 
void DelayMilliSecs (unsigned delay)
 Delay for "delay" x milliseconds. More...
 
void DelayHundredth (unsigned delay)
 Delay for "delay" x 1/100 seconds. More...
 
void DelayTenth (unsigned delay)
 Delay for "delay" x 1/10 seconds. More...
 
void DelaySeconds (unsigned delay)
 Delay for "delay" x seconds. More...
 

Detailed Description

This file contains JSAPI functions and classes that are common to all Cortex-based MCU. DO NOT include this include explicitly. It is included by jsapi.h.

Enumeration Type Documentation

USART flow control.

Enumerator
FC_NONE 

no flow control

FC_HARDWARE 

hardware flow control

FC_SOFTWARE 

software flow control

SYSTICK interrupt granularity. A good value for an RTOS is every 10 milliseconds. If interrupts happen too frequently, it will adversely affect system performance.

Enumerator
SYSTICK_10MICROSECOND 

interrupt every 10 microseconds

SYSTICK_100MICROSECOND 

interrupt every 100 microseconds

SYSTICK_MILLISECOND 

interrupt every millisecond

SYSTICK_HUNDREDTHSECOND 

interrupt every 1/100 second

enum usart_mode

USART operating mode.

Enumerator
MODE_NORMAL 

Polled mode

MODE_INTERRUPT 

interrupt driven mode

Function Documentation

void Delay100MicroSecs ( unsigned  delay)

Delay for "delay" x 100 microseconds.

Parameters
delaydelay multiplier
void Delay10MicroSecs ( unsigned  delay)

Delay for "delay" x 10 microseconds.

Parameters
delaydelay multiplier
void DelayHundredth ( unsigned  delay)

Delay for "delay" x 1/100 seconds.

Parameters
delaydelay multiplier
void DelayMilliSecs ( unsigned  delay)

Delay for "delay" x milliseconds.

Parameters
delaydelay multiplier
void DelaySeconds ( unsigned  delay)

Delay for "delay" x seconds.

Parameters
delaydelay multiplier
void DelayTenth ( unsigned  delay)

Delay for "delay" x 1/10 seconds.

Parameters
delaydelay multiplier
const char* JSAPI_Revision ( void  )

Return the revision of the JSAPI library.

Returns
revision string.