{"id":26658794,"url":"https://github.com/recursiveerror/clockhelper-zig","last_synced_at":"2025-03-25T10:16:50.027Z","repository":{"id":284253918,"uuid":"953632151","full_name":"RecursiveError/ClockHelper-zig","owner":"RecursiveError","description":"ClockHelper is a utility to facilitate clock management on STM32 microcontrollers.","archived":false,"fork":false,"pushed_at":"2025-03-24T23:46:53.000Z","size":2007,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T00:27:14.288Z","etag":null,"topics":["embedded","stm32","zig","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RecursiveError.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-23T19:48:04.000Z","updated_at":"2025-03-24T23:46:56.000Z","dependencies_parsed_at":"2025-03-25T00:37:17.218Z","dependency_job_id":null,"html_url":"https://github.com/RecursiveError/ClockHelper-zig","commit_stats":null,"previous_names":["recursiveerror/clockhelper-zig"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecursiveError%2FClockHelper-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecursiveError%2FClockHelper-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecursiveError%2FClockHelper-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RecursiveError%2FClockHelper-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RecursiveError","download_url":"https://codeload.github.com/RecursiveError/ClockHelper-zig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245440577,"owners_count":20615633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","stm32","zig","zig-package"],"created_at":"2025-03-25T10:16:49.373Z","updated_at":"2025-03-25T10:16:50.019Z","avatar_url":"https://github.com/RecursiveError.png","language":"Zig","readme":"# ClockHelper\n\nClockHelper is a utility to facilitate clock management on STM32 microcontrollers.\n\n## usage\n\nTo use it, it's very simple:\n\nChoose a controller from the [list](src/ClockTrees/):\n```zig\n\nconst ClockHelper = @import(\"ClockHelper\");\n\nconst STM32F103x = ClockHelper.@\"STM32F103C(8-B)Tx\";\n```\n\nCreate a clock using the settings you want to use:\n\n```zig\nconst config = STM32F103x.Config{};\nconst Clock = STM32F103x.Clock(config);\n```\n\nAnd that's it, ClockHelper will give you the clock value of each peripheral for this setting, and it will also warn you if a setting is invalid!\n\n```zig\nconst std = @import(\"std\");\nconst ClockHelper = @import(\"ClockHelper\");\n\nconst STM32F103x = ClockHelper.@\"STM32F103C(8-B)Tx\";\n\nconst config = STM32F103x.Config{};\nconst Clock = STM32F103x.Clock(config);\nconst conf_text = ClockHelper.print_clock_configs(config);\n\npub fn main() !void {\n    std.debug.print(\"Corrent Config:\\n{s}\\n\", .{conf_text.*});\n\n    std.debug.print(\n        \\\\Corrent OutClocks:\n        \\\\SysClock: {d}Mhz\n        \\\\AHB Clock: {d}Mhz\n        \\\\APB1 Clock: {d}Mhz\n        \\\\APB2 Clock: {d}Mhz\n        \\\\\n    , .{\n        (Clock.SysCLKOutput.get() / 1_000_000),\n        (Clock.AHBOutput.get() / 1_000_000),\n        (Clock.APB1Output.get() / 1_000_000),\n        (Clock.APB2Output.get() / 1_000_000),\n    });\n}\n\n```\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecursiveerror%2Fclockhelper-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecursiveerror%2Fclockhelper-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecursiveerror%2Fclockhelper-zig/lists"}