Giter Site home page Giter Site logo

fw-clock's Introduction

fw-clock

Common firmware for several stm32f10x based clock projects

Commandline Interface

The clock offers a commandline interface over a serial port.

Setting the time

Since the clock is working with UTC inside, the time needs to be set in UTC. Conversion to the relevant timezone is enabled later by setting the timezone. The time can be set with the rtc_write command.

rtc_write <yr> <mon> <day> <hr> <min> <sec>

Setting the timezone

The timezone can be set with the tz_write command.

tz_write (std|dst) <offset> <hour> <dow> <week> <month>

  • offset (offset in minutes for the given rule)
  • hour (hour of day, where the new time starts)
  • dow (dow day of week, 0=monday ... 6=sunday)
  • week (week of month, 1=first ... 3=third, 0=last)
  • month (month in year, 1=january ... 12=december)

For Germany just type:

tz_write std 60 3 6 0 10

tz_write dst 120 2 6 0 3

Most common Daylight Saving Time rules:

Timezone Name Offset Month Week Day of week Hour
Europe/London WET UTC+0 March last Sunday 1
WEST UTC+1 October last Sunday 1
Europe/Berlin MEZ UTC+1 March last Sunday 1
MESZ UTC+2 October last Sunday 1
Europe/Athens EET UTC+2 March last Sunday 1
EEST UTC+3 October last Sunday 1
Europe/Moscow MSK UTC+4

License

Some parts of the firmware are based on the LPC11U_LPC13U_CodeBase of Kevin Townsend. Some files are modified and should be commented so. Some other files adapt the scheme of coding mostly used in the codebase.

Where possible, all code is provided under a BSD style license, but each file is individually licensed and you should ensure that you fully understand the license terms and limitations of any files you use in your project.

fw-clock's People

Contributors

jan1s avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.