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.
59 lines
1.3 KiB
C++
59 lines
1.3 KiB
C++
/*
|
|
* SCIA.h
|
|
*
|
|
* Author: Aleksey Gerasimenko
|
|
* gerasimenko.aleksey.n@gmail.com
|
|
*/
|
|
#include "F28335/DSP28x_Project.h"
|
|
|
|
#include "DSP28335/SCIBase.h"
|
|
|
|
#ifndef DSP28335_SCIA_H_
|
|
#define DSP28335_SCIA_H_
|
|
|
|
|
|
#ifndef SCIA_BAUDRATE_DEFAULT
|
|
#define SCIA_BAUDRATE_DEFAULT (DSP28335::BR9600)
|
|
#endif
|
|
|
|
#ifndef SCIA_PARITY_DEFAULT
|
|
#define SCIA_PARITY_DEFAULT (DSP28335::NO)
|
|
//#define SCIA_PARITY_DEFAULT (DSP28335::ODD)
|
|
//#define SCIA_PARITY_DEFAULT (DSP28335::EVEN)
|
|
#endif
|
|
|
|
#ifndef SCIA_STOPBITS_DEFAULT
|
|
#define SCIA_STOPBITS_DEFAULT (DSP28335::ONE)
|
|
#endif
|
|
|
|
#ifndef SCIA_LENGHT_DEFAULT
|
|
#define SCIA_LENGHT_DEFAULT (DSP28335::LEN8)
|
|
#endif
|
|
|
|
#ifndef SCIA_GPIO_SETUP_DEFAULT
|
|
#define SCIA_GPIO_SETUP_DEFAULT (&DSP28335::GPIO::gpio_scia_setup)
|
|
#endif
|
|
|
|
|
|
namespace DSP28335
|
|
{
|
|
|
|
class SCIA: public DSP28335::SCIBase
|
|
{
|
|
public:
|
|
SCIA(volatile struct SCI_REGS& SciRegs);
|
|
void setup();
|
|
void setup(DSP28335::SCISetup& setup);
|
|
void get_default_configuration(DSP28335::SCIConfiguration& config);
|
|
void get_configuration(DSP28335::SCIConfiguration& config);
|
|
void set_configuration(DSP28335::SCIConfiguration& config);
|
|
bool compare_configuration(DSP28335::SCIConfiguration& config);
|
|
protected:
|
|
void _configure(DSP28335::SCIConfiguration& config);
|
|
//
|
|
};//end class SCIA
|
|
|
|
} /* namespace DSP28335 */
|
|
|
|
#endif /* DSP28335_SCIA_H_ */
|