atom-msp430-0.5.3: Convenience functions for using Atom with the MSP430 microcontroller family.

Safe HaskellNone

Language.Atom.MSP430.Compile

Synopsis

Documentation

data MSP430Compilation Source

Program information. It specifies the functions that should be used in specific roles in the compiled code, as well as other configuration information.

Constructors

MSP430Compilation 

Fields

setupFn :: Maybe (Atom ())

Function called once when the MCU starts up.

setupFnName :: String

Name of the setup function in the generated code.

loopFn :: Maybe (Atom ())

Function called in a busy loop after setup.

loopFnName :: String

Name of the loop function in the generated code.

timerAISR :: Maybe (Atom ())

Function to run when a TimerA CCR interrupt happens.

timerAISRName :: String

Name of the TimerA interrupt function in the generated code.

watchdogISR :: Maybe (Atom ())

Function to call when the WDT interrupts.

watchdogISRName :: String

Name of the WDT interrupt function in the generated code.

port1ISR :: Maybe (Atom ())

Function to call when there is a PORT1 interrupt.

port1ISRName :: String

Name of the PORT1 interrupt function.

port2ISR :: Maybe (Atom ())

Function to call when there is a PORT2 interrupt.

port2ISRName :: String

Name of the PORT2 interrupt function.

mainFile :: String

Name of the main file to generate.

emitMainFn :: Bool

Add a main function calling setup and loop?

mspProgram :: MSP430CompilationSource

Default program to construct your own programs from. Contains Nothing and generates a basic main.c. Use it by overriding the functions it generates, and optionally their names.

wiringProgram :: Atom () -> Atom () -> MSP430CompilationSource

Easy settings for a Wiring-style program with setup and loop functions. Expects a device extension for header files - i.e. running with g2231 wihh generate files that #include msp430g2231.h

simpleProgram :: Atom () -> MSP430CompilationSource

Easy settings for a program with just a setup function.

energiaProgram :: Atom () -> Atom () -> MSP430CompilationSource

Easy settings for a program with setup and loop, but no main function.

mspCompile :: String -> MSP430Compilation -> IO ()Source

Compile a program given by the compilation specification. Compiles all functions into library files and then generates a main file which calls these functions in the appropriate way.