CodeGen.hs.template 590 B

123456789101112131415161718192021222324
  1. {-# LANGUAGE ScopedTypeVariables #-}
  2. {-# LANGUAGE DataKinds #-}
  3. {-# OPTIONS_GHC -fno-warn-unused-imports #-}
  4. module Main where
  5. import Ivory.Language
  6. import Ivory.Tower
  7. import Ivory.Tower.Config
  8. import Ivory.Tower.Compile
  9. import Ivory.OS.FreeRTOS.Tower.STM32
  10. $imports$
  11. main :: IO ()
  12. main = towerCompile p app
  13. where p topts = do
  14. cfg <- getConfig topts (stm32ConfigParser (stm32f405Defaults 24))
  15. return (stm32FreeRTOS id cfg)
  16. app :: Tower e ()
  17. app = do
  18. (c :: (ChanInput (Array 80 (Stored Uint8)), ChanOutput (Array 80 (Stored Uint8)))) <- channel
  19. $app_body$