Commit d5b2a699 authored by Alessio Igor Bogani's avatar Alessio Igor Bogani
Browse files

Changes

parent 076be828
......@@ -116,13 +116,13 @@ struct pru2pru_data_transfer {
} p2pdt;
volatile float OCnorm, OCnorm_previous;
#define MAX_SRAM_SAMPLES 100
#define SAMPLES 100
struct pru2user_data_transfer {
float OCnorm;
unsigned int OVnorm;
unsigned int num5ns;
};
struct pru2user_data_transfer p2udt[MAX_SRAM_SAMPLES];
struct pru2user_data_transfer p2udt[SAMPLES];
void SetSPI();
void SetADCBB();
......@@ -291,12 +291,12 @@ int main(void)
p2udt[HEAD_index].num5ns = PRU1_CTRL.CYCLE;
HEAD_index++;
if (HEAD_index >= 100) {
if (HEAD_index >= SAMPLES) {
HEAD_index = 0;
Debug2++; // Notification
if (pru_rpmsg_send(&transport, dst, src, &p2udt,
sizeof(struct pru2user_data_transfer) * 100) != PRU_RPMSG_SUCCESS) {
sizeof(struct pru2user_data_transfer) * SAMPLES) != PRU_RPMSG_SUCCESS) {
// FIXME Is it works? Or always return success?
Debug3++; // Notifications failed
}
......
Markdown is supported
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