Skip to content
  • Peter Zumbruch's avatar
    can.c / can.h · 35c09780
    Peter Zumbruch authored
    - refactoring
    - renaming of error messages
    - added canBusMode strings
    - canSendMessage
      - implemented check on canBusMode (current status) before sending
        - in case of an error (disabled, bus off, error passive) subsequent transmit are ignored until bus mode has been reset to "undefined"
          - which happens automatically by the can timer mechanism 
    	within canBusStateResetInterval_seconds with a granularity 
    	of the calculated canTimerInterval given by CANTCON
    - new: canSetCanTimer 
      - enables to set the can timer clock cycle either 
        - by setting the prescaler [0,0xff] Tclk = 1/F_CPU x 8 x (prescaler + 1)
        - or by
        - setting the time in seconds
    - canInit
      - added canSetCanTimer
      - setting canBusStoreState 
    - canIsGeneralStatusErrorAndAcknowledge
      moved as inline to can.h 
    - canIsMObErrorAndAcknowledge
      moved as inline to can.h 
    - ISR(CANIT_vect)
      - setting canBusStoreState for BOFFIT interrupt
    - ISR(OVRIT_vect)
      - reset error canBusStoredStates every canBusStateResetInterval_seconds 
        with the granularity canBusStoredState of the calculated canTimerInterval given by CANTCON 
        to canBusStoredState to undefined to allow for recovery
    
      - defined macro CAN_BUS_STATE_RESET_INTERVAL_SECONDS = 60.
      - enum:
          - bus state 
          - timer units 
      - new inline canGetCurrentBusModeStatus 
    
    
    git-svn-id: https://subversion.gsi.de/epics/trunk/hadcon/API-Slave@408 50339f28-a4cd-11e1-ab1f-8360dde1fe65
    35c09780