##// END OF EJS Templates
alignment added to variables initialized by memset...
paul -
r338:f3be7fb04b63 R3++ draft
parent child
Show More
@@ -108,6 +108,7 int check_sy_lfr_filter_parameters( ccsd
108 108 // KCOEFFICIENTS
109 109 int set_sy_lfr_kcoeff(ccsdsTelecommandPacket_t *TC , rtems_id queue_id);
110 110 void copyFloatByChar( unsigned char *destination, unsigned char *source );
111 void copyInt32ByChar( unsigned char *destination, unsigned char *source );
111 112 void floatToChar( float value, unsigned char* ptr);
112 113
113 114 void init_parameter_dump( void );
@@ -124,7 +124,7 rtems_task recv_task( rtems_task_argumen
124 124 */
125 125
126 126 int len;
127 ccsdsTelecommandPacket_t currentTC;
127 ccsdsTelecommandPacket_t __attribute__((aligned(4))) currentTC;
128 128 unsigned char computed_CRC[ BYTES_PER_CRC ];
129 129 unsigned char currentTC_LEN_RCV[ BYTES_PER_PKT_LEN ];
130 130 unsigned char destinationID;
@@ -190,10 +190,10 rtems_task prc0_task( rtems_task_argumen
190 190 rtems_status_code status;
191 191 rtems_id queue_id;
192 192 rtems_id queue_id_q_p0;
193 bp_packet_with_spare packet_norm_bp1;
194 bp_packet packet_norm_bp2;
195 bp_packet packet_sbm_bp1;
196 bp_packet packet_sbm_bp2;
193 bp_packet_with_spare __attribute__((aligned(4))) packet_norm_bp1;
194 bp_packet __attribute__((aligned(4))) packet_norm_bp2;
195 bp_packet __attribute__((aligned(4))) packet_sbm_bp1;
196 bp_packet __attribute__((aligned(4))) packet_sbm_bp2;
197 197 ring_node *current_ring_node_to_send_asm_f0;
198 198 float nbSMInASMNORM;
199 199 float nbSMInASMSBM;
@@ -191,10 +191,10 rtems_task prc1_task( rtems_task_argumen
191 191 rtems_status_code status;
192 192 rtems_id queue_id_send;
193 193 rtems_id queue_id_q_p1;
194 bp_packet_with_spare packet_norm_bp1;
195 bp_packet packet_norm_bp2;
196 bp_packet packet_sbm_bp1;
197 bp_packet packet_sbm_bp2;
194 bp_packet_with_spare __attribute__((aligned(4))) packet_norm_bp1;
195 bp_packet __attribute__((aligned(4))) packet_norm_bp2;
196 bp_packet __attribute__((aligned(4))) packet_sbm_bp1;
197 bp_packet __attribute__((aligned(4))) packet_sbm_bp2;
198 198 ring_node *current_ring_node_to_send_asm_f1;
199 199 float nbSMInASMNORM;
200 200 float nbSMInASMSBM;
@@ -139,8 +139,8 rtems_task prc2_task( rtems_task_argumen
139 139 rtems_status_code status;
140 140 rtems_id queue_id_send;
141 141 rtems_id queue_id_q_p2;
142 bp_packet packet_norm_bp1;
143 bp_packet packet_norm_bp2;
142 bp_packet __attribute__((aligned(4))) packet_norm_bp1;
143 bp_packet __attribute__((aligned(4))) packet_norm_bp2;
144 144 ring_node *current_ring_node_to_send_asm_f2;
145 145 float nbSMInASMNORM;
146 146
@@ -29,7 +29,7 rtems_task actn_task( rtems_task_argumen
29 29
30 30 int result;
31 31 rtems_status_code status; // RTEMS status code
32 ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task
32 ccsdsTelecommandPacket_t __attribute__((aligned(4))) TC; // TC sent to the ACTN task
33 33 size_t size; // size of the incoming TC packet
34 34 unsigned char subtype; // subtype of the current TC packet
35 35 unsigned char time[BYTES_PER_TIME];
@@ -178,13 +178,17 int action_enter_mode(ccsdsTelecommandPa
178 178 unsigned int transitionCoarseTime;
179 179 unsigned char * bytePosPtr;
180 180
181 printf("(0)\n");
181 182 bytePosPtr = (unsigned char *) &TC->packetID;
182
183 printf("(1)\n");
183 184 requestedMode = bytePosPtr[ BYTE_POS_CP_MODE_LFR_SET ];
184 transitionCoarseTime_ptr = (unsigned int *) ( &bytePosPtr[ BYTE_POS_CP_LFR_ENTER_MODE_TIME ] );
185 transitionCoarseTime = (*transitionCoarseTime_ptr) & COARSE_TIME_MASK;
186
185 printf("(2)\n");
186 copyInt32ByChar( &transitionCoarseTime, &bytePosPtr[ BYTE_POS_CP_LFR_ENTER_MODE_TIME ] );
187 printf("(3)\n");
188 transitionCoarseTime = transitionCoarseTime & COARSE_TIME_MASK;
189 printf("(4)\n");
187 190 status = check_mode_value( requestedMode );
191 printf("(5)\n");
188 192
189 193 if ( status != LFR_SUCCESSFUL ) // the mode value is inconsistent
190 194 {
@@ -682,6 +686,8 int enter_mode_normal( unsigned int tran
682 686
683 687 status = RTEMS_UNSATISFIED;
684 688
689 printf("hop\n");
690
685 691 switch( lfrCurrentMode )
686 692 {
687 693 case LFR_MODE_STANDBY:
@@ -1511,6 +1511,14 void copyFloatByChar( unsigned char *des
1511 1511 destination[BYTE_3] = source[BYTE_3];
1512 1512 }
1513 1513
1514 void copyInt32ByChar( unsigned char *destination, unsigned char *source )
1515 {
1516 destination[BYTE_0] = source[BYTE_0];
1517 destination[BYTE_1] = source[BYTE_1];
1518 destination[BYTE_2] = source[BYTE_2];
1519 destination[BYTE_3] = source[BYTE_3];
1520 }
1521
1514 1522 void floatToChar( float value, unsigned char* ptr)
1515 1523 {
1516 1524 unsigned char* valuePtr;
General Comments 0
You need to be logged in to leave comments. Login now