-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Joyetech eVic VTwo Mini (vtwom)
This commit introduces the porting framework and adds support for the VTwo Mini, target name 'vtwom'. It also includes dependency support for ASM files and a few additions to .gitignore.
- Loading branch information
1 parent
b5f8447
commit c1e7bc5
Showing
20 changed files
with
381 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is part of eVic SDK. | ||
# | ||
# eVic SDK is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# eVic SDK is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# Copyright (C) 2016 ReservedField | ||
|
||
ifndef __evicsdk_make_device_evic_inc | ||
__evicsdk_make_device_evic_inc := 1 | ||
|
||
include $(EVICSDK)/make/Device.mk | ||
|
||
$(call add-device,evic, \ | ||
device/evic/src/Device.o, \ | ||
device/evic/src/startup.o) | ||
|
||
endif # __evicsdk_make_device_evic_inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* This file is part of eVic SDK. | ||
* | ||
* eVic SDK is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* eVic SDK is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Copyright (C) 2016 ReservedField | ||
*/ | ||
|
||
#ifndef EVICSDK_DEVICE_EVIC_H | ||
#define EVICSDK_DEVICE_EVIC_H | ||
|
||
#define DEVICE_EVIC | ||
#define DEVICE_ADC_MODULE_VBAT 0x12 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* This file is part of eVic SDK. | ||
* | ||
* eVic SDK is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* eVic SDK is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Copyright (C) 2016 ReservedField | ||
*/ | ||
|
||
#include <Device.h> | ||
#include <Display.h> | ||
#include <SysInfo.h> | ||
|
||
Display_Type_t Device_GetDisplayType() { | ||
switch(gSysInfo.hwVersion) { | ||
case 102: | ||
case 103: | ||
case 106: | ||
case 108: | ||
case 109: | ||
case 111: | ||
return DISPLAY_SSD1327; | ||
default: | ||
return DISPLAY_SSD1306; | ||
} | ||
} | ||
|
||
uint8_t Device_GetAtomizerShunt() { | ||
switch(gSysInfo.hwVersion) { | ||
case 101: | ||
case 108: | ||
return 125; | ||
case 103: | ||
case 104: | ||
case 105: | ||
case 106: | ||
return 110; | ||
case 107: | ||
case 109: | ||
return 120; | ||
case 110: | ||
case 111: | ||
return 105; | ||
default: | ||
return 115; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@ This file is part of eVic SDK. | ||
@ | ||
@ eVic SDK is free software: you can redistribute it and/or modify | ||
@ it under the terms of the GNU General Public License as published by | ||
@ the Free Software Foundation, either version 3 of the License, or | ||
@ (at your option) any later version. | ||
@ | ||
@ eVic SDK is distributed in the hope that it will be useful, | ||
@ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
@ GNU General Public License for more details. | ||
@ | ||
@ You should have received a copy of the GNU General Public License | ||
@ along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
@ | ||
@ Copyright (C) 2016 ReservedField | ||
|
||
#include <Verify.s> | ||
|
||
.syntax unified | ||
|
||
@ Product ID: E052 | ||
@ Max HW version: 1.11 | ||
DEVICE_INFO E052 111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is part of eVic SDK. | ||
# | ||
# eVic SDK is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# eVic SDK is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# Copyright (C) 2016 ReservedField | ||
|
||
ifndef __evicsdk_make_device_vtwom_inc | ||
__evicsdk_make_device_vtwom_inc := 1 | ||
|
||
include $(EVICSDK)/make/Device.mk | ||
|
||
$(call add-device,vtwom, \ | ||
device/vtwom/src/Device.o, \ | ||
device/vtwom/src/startup.o) | ||
|
||
endif # __evicsdk_make_device_vtwom_inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* This file is part of eVic SDK. | ||
* | ||
* eVic SDK is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* eVic SDK is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Copyright (C) 2016 ReservedField | ||
*/ | ||
|
||
#ifndef EVICSDK_DEVICE_VTWOM_H | ||
#define EVICSDK_DEVICE_VTWOM_H | ||
|
||
#define DEVICE_VTWOM | ||
#define DEVICE_ADC_MODULE_VBAT 0x00 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* This file is part of eVic SDK. | ||
* | ||
* eVic SDK is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* eVic SDK is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Copyright (C) 2016 ReservedField | ||
*/ | ||
|
||
#include <Device.h> | ||
#include <Display.h> | ||
|
||
Display_Type_t Device_GetDisplayType() { | ||
return DISPLAY_SSD1306; | ||
} | ||
|
||
uint8_t Device_GetAtomizerShunt() { | ||
return 115; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@ This file is part of eVic SDK. | ||
@ | ||
@ eVic SDK is free software: you can redistribute it and/or modify | ||
@ it under the terms of the GNU General Public License as published by | ||
@ the Free Software Foundation, either version 3 of the License, or | ||
@ (at your option) any later version. | ||
@ | ||
@ eVic SDK is distributed in the hope that it will be useful, | ||
@ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
@ GNU General Public License for more details. | ||
@ | ||
@ You should have received a copy of the GNU General Public License | ||
@ along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
@ | ||
@ Copyright (C) 2016 ReservedField | ||
|
||
#include <Verify.s> | ||
|
||
.syntax unified | ||
|
||
@ Product ID: E115 | ||
@ Max HW version: 1.00 | ||
DEVICE_INFO E115 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* This file is part of eVic SDK. | ||
* | ||
* eVic SDK is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* eVic SDK is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with eVic SDK. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Copyright (C) 2016 ReservedField | ||
*/ | ||
|
||
#ifndef EVICSDK_DEVICE_H | ||
#define EVICSDK_DEVICE_H | ||
|
||
#include <Display.h> | ||
|
||
/** | ||
* Defines: | ||
* DEVICE_xxx: check concrete header for name. | ||
* DEVICE_ADC_MODULE_VBAT: battery voltage ADC module. | ||
*/ | ||
|
||
/** | ||
* Gets the display controller type for this device. | ||
* | ||
* @return Display type. | ||
*/ | ||
Display_Type_t Device_GetDisplayType(); | ||
|
||
/** | ||
* Gets the atomizer shunt resistance. | ||
* | ||
* @return Shunt resistance, in 100ths of a mOhm. | ||
*/ | ||
uint8_t Device_GetAtomizerShunt(); | ||
|
||
// Include concrete header | ||
#include_next <Device.h> | ||
|
||
#endif |
Oops, something went wrong.