Commit 843ce5a5 authored by Jacques Labaisse's avatar Jacques Labaisse
Browse files

Remove extern variables replace by functions

parent 4168e4c7
......@@ -33,15 +33,13 @@
#include "opalib_quick_start.h"
float32_t v_ref = 10.0F;
float32_t v_send = 0.0F;
void main(void)
{
opalib_quick_start_set_hardware_version(v_1_1_2);
opalib_quick_start_init_voltage(opalib_pid_voltage_calculation_and_pwm_update, 50);
opalib_pid_voltage_init_buck(v_ref, 0.000215, 2.86, 0, 50);
opalib_pid_voltage_init_buck(10, 0.000215, 2.86, 0, 50);
opalib_quick_start_launch_task();
......
......@@ -44,8 +44,8 @@ float32_t i2low_out = 0;
float32_t vhigh_out = 0;
float32_t ihigh_out = 0;
extern float32_t v_ref;
extern float32_t v_send;
float32_t v_ref;
float32_t v_send;
static float32_t load_dim = 1.0;
bool loadEnable = true;
......@@ -269,4 +269,9 @@ void uint64_to_base32(uint64_t in, char *out, size_t size, const char *alphabet)
out[len] = '\0';
}
void *get_data_ptr(int nodeRank){
return data_nodes[nodeRank].data;
}
#endif /* CUSTOM_DATA_NODES_FILE */
......@@ -68,4 +68,13 @@ const char alphabet_crockford[] = "0123456789abcdefghjkmnpqrstvwxyz";
*/
void uint64_to_base32(uint64_t in, char *out, size_t size, const char *alphabet);
/**
* returns the address of
* the variable linked to a
* data node which is stored
* at rank nodeRank in
* data_nodes
*/
void *get_data_ptr(int nodeRank);
#endif // DATA_NODES_H_
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment