Skip to content

Freireg/Hematite-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hematite-Project

This is a small ThreadX exercise. The application will run threads to do multiple interfaces and use some of the ThreadX native packages.

A TFT display is used to show the current status of the threads, including each uptime, status, and a dummy data. All threads communicates via queues and a simple semaphore is used to trigger the USB thread.

img

Hardware

Dependencies

Application Definition

stateDiagram-v2
    state fork_state <<fork>>
        [*] --> SchedulerStart
    SchedulerStart --> fork_state
    

    fork_state --> DisplayThread
    state DisplayThread {
        [*] --> initSPI
        initSPI --> initDisplay
        initDisplay --> setStaticBackground
        setStaticBackground --> readQueueMessage
        readQueueMessage --> updateMonitorValues
        updateMonitorValues --> readQueueMessage
    }

    fork_state --> USBThread
    state USBThread {
        [*] --> getTicks
        getTicks --> waitForSemaphore
        waitForSemaphore --> printCounterValue
        printCounterValue --> getRunTime
        getRunTime --> sendUSBXThreadMessage
        sendUSBXThreadMessage --> getTicks
    }

    fork_state --> FileThread
    state FileThread {
        [*] --> initSDIO
        initSDIO --> formatSD
        formatSD --> openFile
        openFile --> writeString
        writeString --> closeFile
        closeFile --> [*]

    }

    fork_state --> BlinkyThread
    state BlinkyThread {
        [*] --> getStartTime
        getStartTime --> toggleGPIO
        toggleGPIO --> getCurrentTime
        getCurrentTime --> sendBlikyThreadMessage
        sendBlikyThreadMessage --> putSemaphore
        putSemaphore --> delay
        delay --> toggleGPIO


    }
Loading

About

This is a small ThreadX exercise. The application will run threads to do multiple interfaces and use some of the ThreadX native packages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages