Change i2c library
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -13,3 +13,6 @@
|
||||
[submodule "ds3231/type"]
|
||||
path = ds3231/type
|
||||
url = git@git.blackmark.me:avr/type.git
|
||||
[submodule "ds3231/i2c"]
|
||||
path = ds3231/i2c
|
||||
url = git@git.blackmark.me:avr/i2c.git
|
||||
|
||||
Submodule ds3231/ds3231 updated: 04af54e7c8...2768009720
@@ -83,6 +83,17 @@
|
||||
</custom>
|
||||
<AAFDebugger>
|
||||
<AAFDebugFiles>
|
||||
<DebugFile>
|
||||
<path>\Debug\ds3231.lss</path>
|
||||
<AAFSetting>
|
||||
<Label>Lss Files</Label>
|
||||
<Extention>.lss</Extention>
|
||||
<Regex>^\s*(?<address>[a-f0-9]*):\s*.*$</Regex>
|
||||
<DebugEnabled>true</DebugEnabled>
|
||||
<RegexGroups>address</RegexGroups>
|
||||
<DebuggerExpression>$pc</DebuggerExpression>
|
||||
</AAFSetting>
|
||||
</DebugFile>
|
||||
</AAFDebugFiles>
|
||||
</AAFDebugger>
|
||||
</PropertyGroup>
|
||||
@@ -213,21 +224,15 @@
|
||||
<Compile Include="ds3231\rtc.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ds3231\twi-lowlevel.cpp">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ds3231\twi-lowlevel.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ds3231\twi.cpp">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ds3231\twi.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="flash\flash.hpp">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="i2c\hardware.hpp">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="i2c\i2c.hpp">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="io\io.hpp">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
@@ -266,6 +271,7 @@
|
||||
<Folder Include="ds3231" />
|
||||
<Folder Include="io" />
|
||||
<Folder Include="flash" />
|
||||
<Folder Include="i2c" />
|
||||
<Folder Include="uart" />
|
||||
<Folder Include="type" />
|
||||
</ItemGroup>
|
||||
|
||||
1
ds3231/i2c
Submodule
1
ds3231/i2c
Submodule
Submodule ds3231/i2c added at ff131d92a1
@@ -1,14 +1,16 @@
|
||||
#include "clock.hpp"
|
||||
|
||||
#include <avr/interrupt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "systime.h"
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "uart/uart.hpp"
|
||||
|
||||
#include "systime.h"
|
||||
|
||||
using uart_t = uart::Uart0<>;
|
||||
|
||||
REGISTER_UART0_INT_VECTORS(uart_t);
|
||||
|
||||
@@ -22,7 +22,6 @@ int SysTime::euDST( const time_t *pTime, int32_t *pZ )
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool SysTime::init()
|
||||
{
|
||||
twi_init_master();
|
||||
rtc_init();
|
||||
|
||||
if( !rtc_is_ds3231() )
|
||||
@@ -104,4 +103,4 @@ void SysTime::setTime( const tm &sTime )
|
||||
rtc_set_time( pRtcTime );
|
||||
|
||||
syncSysTime();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "ds3231/twi.h"
|
||||
#include "ds3231/rtc.h"
|
||||
|
||||
class SysTime
|
||||
|
||||
Reference in New Issue
Block a user