dodany kod c od Krzyska po wielu modyfikacjach przez Gemini zeby usunac zalezność od TI-RTOS
This commit is contained in:
27
src/cfg_state.c
Normal file
27
src/cfg_state.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* cfg_state.c
|
||||
*
|
||||
* Created on: 22-02-2017
|
||||
* Author:
|
||||
*/
|
||||
|
||||
|
||||
#include "cfg_state.h"
|
||||
|
||||
#include "helper.h"
|
||||
|
||||
int state_initlog(void *arguments, void *logic)
|
||||
{
|
||||
struct state_args *args = (struct state_args *)arguments;
|
||||
struct state_logic *log = (struct state_logic *)logic;
|
||||
|
||||
if(set_bit_ptr_mask(args->io.out,&log->out_bit,&log->out_bit_mask))
|
||||
return -1;
|
||||
|
||||
if (args->params.bity)
|
||||
*log->out_bit |= log->out_bit_mask;
|
||||
else
|
||||
*log->out_bit &= ~log->out_bit_mask;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user