Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
card-access-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bc. Petr Elexa
card-access-system
Commits
46c5ba1b
Commit
46c5ba1b
authored
Nov 17, 2019
by
Bc. Petr Elexa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panel: fix return type
parent
a90899f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
reader.c
cardreader/bsp/reader.c
+4
-4
reader.h
cardreader/bsp/reader.h
+1
-1
No files found.
cardreader/bsp/reader.c
View file @
46c5ba1b
...
...
@@ -127,13 +127,13 @@ void reader_init(uint8_t idx)
//Create timer only once
if
(
reader_conf
[
idx
].
timer_open
==
NULL
)
{
reader_conf
[
idx
].
timer_open
=
xTimerCreate
(
"PT0"
,
(
reader_conf
[
idx
].
open_time_sec
/
portTICK_PERIOD_MS
),
pdFALSE
,
(
void
*
)(
uint32_t
)
idx
,
_timer_open_callback
);
reader_conf
[
idx
].
timer_open
=
xTimerCreate
(
"PT0"
,
pdMS_TO_TICKS
(
reader_conf
[
idx
].
open_time_sec
),
pdFALSE
,
(
void
*
)(
uint32_t
)
idx
,
_timer_open_callback
);
}
configASSERT
(
reader_conf
[
idx
].
timer_open
);
if
(
reader_conf
[
idx
].
timer_ok
==
NULL
)
{
reader_conf
[
idx
].
timer_ok
=
xTimerCreate
(
"PT1"
,
(
reader_conf
[
idx
].
gled_time_sec
/
portTICK_PERIOD_MS
),
pdFALSE
,
(
void
*
)(
uint32_t
)
idx
,
_timer_ok_callback
);
reader_conf
[
idx
].
timer_ok
=
xTimerCreate
(
"PT1"
,
pdMS_TO_TICKS
(
reader_conf
[
idx
].
gled_time_sec
),
pdFALSE
,
(
void
*
)(
uint32_t
)
idx
,
_timer_ok_callback
);
}
configASSERT
(
reader_conf
[
idx
].
timer_ok
);
...
...
@@ -181,7 +181,7 @@ void reader_deinit(uint8_t idx)
weigand_disable
(
_reader_wiring
[
idx
].
data_port
,
_reader_wiring
[
idx
].
d0_pin
,
_reader_wiring
[
idx
].
d1_pin
);
}
int8_t
reader_get_request_from_buffer
(
uint32_t
*
user_id
,
uint16_t
time_to_wait_ms
)
u
int8_t
reader_get_request_from_buffer
(
uint32_t
*
user_id
,
uint16_t
time_to_wait_ms
)
{
weigand26_buff_item_t
item
;
size_t
bytes_got
;
...
...
@@ -196,7 +196,7 @@ int8_t reader_get_request_from_buffer(uint32_t * user_id, uint16_t time_to_wait_
}
else
{
return
-
1
;
return
UINT8_MAX
;
}
}
...
...
cardreader/bsp/reader.h
View file @
46c5ba1b
...
...
@@ -78,7 +78,7 @@ void reader_deinit(uint8_t idx);
* @param idx ... reader index
* @param ... time_to_wait_ms ... time to wait for request
*/
int8_t
reader_get_request_from_buffer
(
uint32_t
*
user_id
,
uint16_t
time_to_wait_ms
);
u
int8_t
reader_get_request_from_buffer
(
uint32_t
*
user_id
,
uint16_t
time_to_wait_ms
);
/**
* @brief Unlock door belonging to reader.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment