Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
M
Meh-sla Automotive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
3
Snippets
Groups
Projects
Show more breadcrumbs
Karthigai Amutha Ezhilarasu
Meh-sla Automotive
Commits
2979d599
You need to sign in or sign up before continuing.
Commit
2979d599
authored
2 years ago
by
Karthigai Amutha Ezhilarasu
Browse files
Options
Downloads
Patches
Plain Diff
periodic_callbacks edited
parent
75567dfc
No related branches found
No related tags found
2 merge requests
!16
Bridge board bluetooth
,
!4
lab7 sensor board
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/bridge_controller/l5_application/periodics/periodic_callbacks.c
+14
-12
14 additions, 12 deletions
..._controller/l5_application/periodics/periodic_callbacks.c
with
14 additions
and
12 deletions
projects/bridge_controller/l5_application/periodics/periodic_callbacks.c
+
14
−
12
View file @
2979d599
#include
"periodic_callbacks.h"
#include
"board_io.h"
#include
"can_bus.h"
#include
"can_bus_initializer.h"
#include
"can_bus_message_handler.h"
#include
"gpio.h"
#include
"project.h"
#include
"sonar.h"
#include
<stdio.h>
/******************************************************************************
* Your board will reset if the periodic function does not return within its deadline
...
...
@@ -10,28 +15,25 @@
*/
void
periodic_callbacks__initialize
(
void
)
{
// This method is invoked once when the periodic tasks are created
sonar__init
();
can_bus__initializer
(
can1
);
}
void
periodic_callbacks__1Hz
(
uint32_t
callback_count
)
{
gpio__toggle
(
board_io__get_led0
());
// Add your code here
}
void
periodic_callbacks__1Hz
(
uint32_t
callback_count
)
{}
void
periodic_callbacks__10Hz
(
uint32_t
callback_count
)
{
gpio__toggle
(
board_io__get_led1
());
// Add your code here
}
void
periodic_callbacks__100Hz
(
uint32_t
callback_count
)
{
gpio__toggle
(
board_io__get_led2
());
// Add your code here
can_handler__manage_mia_10hz
();
can_handler__transmit_messages
();
can_handler__handle_all_incoming_messages
();
}
void
periodic_callbacks__100Hz
(
uint32_t
callback_count
)
{}
/**
* @warning
* This is a very fast 1ms task and care must be taken to use this
* This may be disabled based on intialization of periodic_scheduler__initialize()
*/
void
periodic_callbacks__1000Hz
(
uint32_t
callback_count
)
{
gpio__toggle
(
board_io__get_led3
());
// Add your code here
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment