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.
32 lines
610 B
C++
32 lines
610 B
C++
2 years ago
|
/*
|
||
|
History:
|
||
|
20230504 - V0.2
|
||
|
20230504 - V0.1 init.
|
||
|
*/
|
||
|
|
||
|
#include <SC_MC9.h>
|
||
|
|
||
|
#include <Arduino.h>
|
||
|
//#include <HardwareSerial.h>
|
||
|
|
||
|
void SC_MC9_setup(){
|
||
|
Serial1.begin(9600);
|
||
|
pinMode(RS485_OE_1, OUTPUT);
|
||
|
delay(10);
|
||
|
digitalWrite(RS485_OE_1, HIGH);
|
||
|
}
|
||
|
|
||
|
|
||
|
void SC_MC9_read(int arr[], int size){
|
||
|
|
||
|
cli();//stop interrupts
|
||
|
Serial1.print("485 Read!!"); //Serial Write ADC_Value to RS-485 Bus
|
||
|
sei();//allow interrupts
|
||
|
|
||
|
}
|
||
|
|
||
|
void SC_MC9_write(int arr[], int size){
|
||
|
cli();//stop interrupts
|
||
|
Serial1.print("485 Write^^"); //Serial Write ADC_Value to RS-485 Bus
|
||
|
sei();//allow interrupts
|
||
|
}
|