| Electronic Components Datasheet Search |
|
AN1105 Datasheet(PDF) 70 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1105 Datasheet(HTML) 70 Page - STMicroelectronics |
|
70 / 100 page ![]() 70/100 ST7 pCAN PERIPHERAL DRIVER if (ValBit(CANBCSR,RDY)) //Check if the register is already in use { return CAN_TRANSMIT_BUFFER_FULL; //Exit if yes } else { CAN_Buffer* msg_to_send_ptr; u8* data_ptr; CAN_Data_Size data_length; msg_to_send_ptr=CAN_Out_Queue(); //If no, get the first message in the queue if (msg_to_send_ptr==NULL) { return CAN_TRANSMIT_NO_MSG; //Aborts process if queue empty } CANIDLR=0x00; CANIDHR=0x00; data_length=msg_to_send_ptr->data_size; data_ptr=msg_to_send_ptr->CAN_msg_data; //!!!Code is here dependant of the order of the fields in the data structure //Writing both CANIDHR and CANIDLR CANIDLR = *(((unsigned char*)msg_to_send_ptr)+1); CANIDHR = *((unsigned char*)msg_to_send_ptr); _asm("SLL _CANIDLR \n RLC _CANIDHR"); { register u8 counter; if (data_length==REMOTE_FRAME) /*If remote frame, send immediately*/ { SetBit(CANIDLR,RTR); } else { CANIDLR |= data_length; for (counter=0;counter<data_length;counter++) { |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |