You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
649 B
C++
40 lines
649 B
C++
/*
|
|
* ECANB.cpp
|
|
*
|
|
* Author: Aleksey Gerasimenko
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
*/
|
|
|
|
#include "DSP28335/ECANB.h"
|
|
|
|
namespace DSP28335
|
|
{
|
|
//CONSTRUCTOR
|
|
ECANB::ECANB():
|
|
CPUBase(),
|
|
_gpio_setup(&DSP28335::GPIO::gpio_canb_setup)
|
|
{}//CONSTRUCTOR
|
|
|
|
|
|
void ECANB::setup(const ECANBSetup& setup)
|
|
{
|
|
if(m_mode == DSP28335::ECANB::UNDEFINED)
|
|
{
|
|
InitECanb();
|
|
|
|
|
|
if(setup.gpio_setup != 0)
|
|
{
|
|
_gpio_setup = setup.gpio_setup;
|
|
(*_gpio_setup)();
|
|
|
|
m_mode = DSP28335::ECANB::OPERATIONAL;
|
|
//
|
|
}//if
|
|
//
|
|
}//if
|
|
//
|
|
}//
|
|
|
|
} /* namespace DSP28335 */
|