mirror of
				https://github.com/halleysfifthinc/Toyota-AVC-LAN
				synced 2025-10-30 18:07:17 +00:00 
			
		
		
		
	Update/fix pin levels for new transmission design
This commit is contained in:
		
							parent
							
								
									012649d156
								
							
						
					
					
						commit
						4c19f27992
					
				| @ -96,20 +96,28 @@ | |||||||
| 
 | 
 | ||||||
| // Enable AVC bus Tx
 | // Enable AVC bus Tx
 | ||||||
| #define AVC_OUT_EN()                                                           \ | #define AVC_OUT_EN()                                                           \ | ||||||
|   cbi(AC2_CTRLA, AC_ENABLE_bp);                                                \ |   // cbi(AC2_CTRLA, AC_ENABLE_bp);                                                \ | ||||||
|   sbi(VPORTA_DIR, 6); |   // sbi(VPORTA_DIR, 6);
 | ||||||
| 
 | 
 | ||||||
| // Disable AVC bus Tx
 | // Disable AVC bus Tx
 | ||||||
| #define AVC_OUT_DIS()                                                          \ | #define AVC_OUT_DIS()                                                          \ | ||||||
|   cbi(VPORTA_DIR, 6);                                                          \ |   // cbi(VPORTA_DIR, 6);                                                          \ | ||||||
|   sbi(AC2_CTRLA, AC_ENABLE_bp); |   // sbi(AC2_CTRLA, AC_ENABLE_bp);
 | ||||||
| 
 | 
 | ||||||
|  | // clang-format off
 | ||||||
| #define AVC_SET_LOGICAL_1()                                                    \ | #define AVC_SET_LOGICAL_1()                                                    \ | ||||||
|   __asm__ __volatile__(                                                        \ |   __asm__ __volatile__(                                                        \ | ||||||
|       "sbi %[vporta_out], 6;" ::[vporta_out] "I"(_SFR_IO_ADDR(VPORTA_OUT))); |       "cbi %[vporta_out], 4; \n\t"                                             \ | ||||||
|  |       "sbi %[vportc_out], 0; \n\t"                                             \ | ||||||
|  |       ::[vporta_out] "I"(_SFR_IO_ADDR(VPORTA_OUT)),                            \ | ||||||
|  |         [vportc_out] "I"(_SFR_IO_ADDR(VPORTC_OUT))); | ||||||
| #define AVC_SET_LOGICAL_0()                                                    \ | #define AVC_SET_LOGICAL_0()                                                    \ | ||||||
|   __asm__ __volatile__(                                                        \ |   __asm__ __volatile__(                                                        \ | ||||||
|       "cbi %[vporta_out], 6;" ::[vporta_out] "I"(_SFR_IO_ADDR(VPORTA_OUT))); |       "sbi %[vporta_out], 4; \n\t"                                             \ | ||||||
|  |       "cbi %[vportc_out], 0; \n\t"                                             \ | ||||||
|  |       ::[vporta_out] "I"(_SFR_IO_ADDR(VPORTA_OUT)),                            \ | ||||||
|  |         [vportc_out] "I"(_SFR_IO_ADDR(VPORTC_OUT))); | ||||||
|  | // clang-format on
 | ||||||
| 
 | 
 | ||||||
| // Name difference between avr-libc and Microchip pack
 | // Name difference between avr-libc and Microchip pack
 | ||||||
| #if defined(EVSYS_ASYNCCH00_bm) | #if defined(EVSYS_ASYNCCH00_bm) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user