changeset 42:a8813dce24e3

8048131: Replace JC_DAAPI with JC_DIO in DIO Code Reviewed-by: bobv
author jld
date Tue, 09 Sep 2014 10:20:51 -0400
parents e1028c1b8699
children 1ee75426fb8d
files src/se/native/com/oracle/dio/javacall_logging.h src/share/linux/native/com/oracle/dio/gpio/gpio.c src/share/linux/native/com/oracle/dio/i2c/i2c.c src/share/linux/native/com/oracle/dio/mmio/mmio.c src/share/linux/native/com/oracle/dio/spibus/spi.c src/share/linux/native/com/oracle/dio/uart/serial.c src/share/linux/native/com/oracle/dio/uart/uart.c
diffstat 7 files changed, 114 insertions(+), 113 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/native/com/oracle/dio/javacall_logging.h	Mon Sep 08 16:54:30 2014 +0400
+++ b/src/se/native/com/oracle/dio/javacall_logging.h	Tue Sep 09 10:20:51 2014 -0400
@@ -232,6 +232,7 @@
     JC_OJSB,
     JC_CONTACTLESS,
     JC_DAAPI,
+    JC_DIO = JC_DAAPI,
     JC_PROXY,
     JC_NETWORK,
     JC_LINEUI,
--- a/src/share/linux/native/com/oracle/dio/gpio/gpio.c	Mon Sep 08 16:54:30 2014 +0400
+++ b/src/share/linux/native/com/oracle/dio/gpio/gpio.c	Tue Sep 09 10:20:51 2014 -0400
@@ -174,7 +174,7 @@
 javacall_dio_result javacall_gpio_pin_close(javacall_handle handle) {
     GPIOHandle* gpioHandle = (GPIOHandle*) handle;
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Close pin %d", gpioHandle->number);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Close pin %d", gpioHandle->number);
 
     javacall_gpio_pin_notification_stop(handle);
     disable_gpio_pin(gpioHandle->number);
@@ -192,7 +192,7 @@
 */
 javacall_dio_result javacall_gpio_port_close(javacall_handle handle){
     GPIOPortHandle* portHandle = (GPIOPortHandle*) handle;
-    JAVACALL_REPORT_INFO(JC_DAAPI, "GPIO port close");
+    JAVACALL_REPORT_INFO(JC_DIO, "GPIO port close");
     javacall_gpio_port_notification_stop(handle);
     if (JAVACALL_TRUE == portHandle->needPinClose ) {
         close_pins_in_list(portHandle->pinList);
@@ -221,10 +221,10 @@
         /*OUT*/javacall_bool* pVal){
     GPIOHandle* pinHandle = (GPIOHandle*) handle;
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Read value from pin %d", pinHandle->number);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Read value from pin %d", pinHandle->number);
 
     if(JAVACALL_DIO_FAIL == read_value_from_pin(pinHandle, pVal)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not read value from pin %d", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not read value from pin %d", pinHandle->number);
         return JAVACALL_DIO_FAIL;
     };
 
@@ -238,14 +238,14 @@
         const javacall_bool val){
     GPIOHandle* pinHandle = (GPIOHandle*) handle;
 
-    JAVACALL_REPORT_INFO2(JC_DAAPI, "Pin %d write value %d", pinHandle->number, val);
+    JAVACALL_REPORT_INFO2(JC_DIO, "Pin %d write value %d", pinHandle->number, val);
 
     if(JAVACALL_DIO_OK != write_value_to_pin(pinHandle, val)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not write value to GPIO pin %d", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not write value to GPIO pin %d", pinHandle->number);
         return JAVACALL_FAIL;
     }
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Pin %d write value done", pinHandle->number);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Pin %d write value done", pinHandle->number);
     return JAVACALL_DIO_OK;
 }
 
@@ -264,12 +264,12 @@
 
     while(JAVACALL_DIO_FAIL != (listOperationsResult = javautil_list_get_next(portHandle->pinList, (javacall_handle*) &pin))) {
         if(JAVACALL_DIO_INVALID_CONFIG == listOperationsResult) {
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "Invalid handle of GPIO port was passed to read function. Operation aborted");
+            JAVACALL_REPORT_ERROR(JC_DIO, "Invalid handle of GPIO port was passed to read function. Operation aborted");
             return JAVACALL_DIO_INVALID_CONFIG;
         }
 
         if(JAVACALL_DIO_OK != javacall_gpio_pin_read(pin, &readValue)) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "Read operation to port failed, because error with pin %d occurred", pin->number);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "Read operation to port failed, because error with pin %d occurred", pin->number);
             return JAVACALL_DIO_FAIL;
         };
 
@@ -294,21 +294,21 @@
     int iterator = 0;
     javautil_list_reset_iterator(portHandle->pinList);
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Write value %d to port start", val);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Write value %d to port start", val);
 
     while(JAVACALL_DIO_FAIL != (listOperationsResult = javautil_list_get_next(portHandle->pinList, (javacall_handle*) &pin))) {
         if(JAVACALL_DIO_INVALID_CONFIG == listOperationsResult) {
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "Invalid handle of GPIO port was passed to write function. Operation aborted");
+            JAVACALL_REPORT_ERROR(JC_DIO, "Invalid handle of GPIO port was passed to write function. Operation aborted");
             return JAVACALL_DIO_INVALID_CONFIG;
         }
         writeValue = ((val >> iterator) & 0x01) ? JAVACALL_TRUE : JAVACALL_FALSE;
         if(JAVACALL_DIO_OK != javacall_gpio_pin_write(pin, writeValue)) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "Write operation to port failed, because error with pin %d occurred", pin->number);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "Write operation to port failed, because error with pin %d occurred", pin->number);
             return JAVACALL_DIO_FAIL;
         };
         iterator++;
     }
-    JAVACALL_REPORT_INFO(JC_DAAPI, "Write value to port successfully done");
+    JAVACALL_REPORT_INFO(JC_DIO, "Write value to port successfully done");
     return JAVACALL_DIO_OK;
 }
 
@@ -318,20 +318,20 @@
 javacall_dio_result javacall_gpio_pin_notification_start(const javacall_handle handle) {
     GPIOHandle* pinHandle = (GPIOHandle*) handle;
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Enable notifications for pin %d", pinHandle->number);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Enable notifications for pin %d", pinHandle->number);
 
     if(JAVACALL_TRUE == pinHandle->notificationsEnabled) {
-        JAVACALL_REPORT_INFO1(JC_DAAPI, "Notifications are already activated for pin %d Nothing to do", pinHandle->number);
+        JAVACALL_REPORT_INFO1(JC_DIO, "Notifications are already activated for pin %d Nothing to do", pinHandle->number);
         return JAVACALL_DIO_OK;
     }
 
     if(JAVACALL_DIO_OK != activate_platform_notifications_to_pin(pinHandle)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not activate notifications for pin %d", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not activate notifications for pin %d", pinHandle->number);
         return JAVACALL_DIO_FAIL;
     }
 
     if(JAVACALL_DIO_OK != add_pin_for_polling(pinHandle)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not poll value file for GPIO pin %d", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not poll value file for GPIO pin %d", pinHandle->number);
         return JAVACALL_DIO_FAIL;
     }
 
@@ -344,12 +344,12 @@
 javacall_dio_result javacall_gpio_pin_notification_stop(const javacall_handle handle) {
     GPIOHandle* pinHandle = (GPIOHandle*) handle;
     if(JAVACALL_FALSE == pinHandle->notificationsEnabled) {
-        JAVACALL_REPORT_INFO1(JC_DAAPI, "Notifications are already disabled for pin %d Nothing to do", pinHandle->number);
+        JAVACALL_REPORT_INFO1(JC_DIO, "Notifications are already disabled for pin %d Nothing to do", pinHandle->number);
         return JAVACALL_DIO_OK;
     }
     pthread_mutex_lock(&epoll_fd_lock);
     if(JAVACALL_DIO_OK != del_pin_from_polling(pinHandle)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Notifications disable for pin %d failed", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Notifications disable for pin %d failed", pinHandle->number);
         pthread_mutex_unlock(&epoll_fd_lock);
         return JAVACALL_DIO_FAIL;
     }
@@ -365,13 +365,13 @@
     GPIOPortHandle* portHandle = (GPIOPortHandle*) handle;
 
     if(JAVACALL_TRUE == portHandle->notificationsEnabled) {
-        JAVACALL_REPORT_INFO(JC_DAAPI, "Notifications are allready enebled for port, Nothing to do");
+        JAVACALL_REPORT_INFO(JC_DIO, "Notifications are allready enebled for port, Nothing to do");
         return JAVACALL_DIO_OK;
     }
 
     pthread_mutex_lock(&epoll_fd_lock);
     if(JAVACALL_DIO_OK != add_port_for_polling(portHandle)) {
-        JAVACALL_REPORT_INFO(JC_DAAPI, "Fail to start notifications for port");
+        JAVACALL_REPORT_INFO(JC_DIO, "Fail to start notifications for port");
         pthread_mutex_unlock(&epoll_fd_lock);
         return JAVACALL_DIO_FAIL;
     }
@@ -387,13 +387,13 @@
     GPIOPortHandle* portHandle = (GPIOPortHandle*) handle;
 
     if(JAVACALL_FALSE == portHandle->notificationsEnabled) {
-        JAVACALL_REPORT_INFO(JC_DAAPI, "Notifications are allready disabled for port, Nothing to do");
+        JAVACALL_REPORT_INFO(JC_DIO, "Notifications are allready disabled for port, Nothing to do");
         return JAVACALL_DIO_OK;
     }
 
     pthread_mutex_lock(&epoll_fd_lock);
     if(JAVACALL_DIO_OK != del_port_from_polling(portHandle)) {
-        JAVACALL_REPORT_INFO(JC_DAAPI, "Fail to stop notifications for port");
+        JAVACALL_REPORT_INFO(JC_DIO, "Fail to stop notifications for port");
         pthread_mutex_unlock(&epoll_fd_lock);
         return JAVACALL_DIO_FAIL;
     }
@@ -411,7 +411,7 @@
     GPIOHandle* pinHandle = (GPIOHandle*) handle;
 
     if(JAVACALL_DIO_OK != write_direction_to_file(pinHandle->directionFD, direction, JAVACALL_FALSE)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "There is unexpected error, when configure direction of GPIO pin %d", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "There is unexpected error, when configure direction of GPIO pin %d", pinHandle->number);
         return JAVACALL_FAIL;
     };
     pinHandle->direction = direction;
@@ -424,7 +424,7 @@
 javacall_dio_result javacall_gpio_pin_direction_get(const javacall_handle handle,
         /*OUT*/javacall_bool* const pDirection) {
     GPIOHandle* pinHandle = (GPIOHandle*) handle;
-    JAVACALL_REPORT_INFO2(JC_DAAPI, "Pin %d direction: %d", pinHandle->number, pinHandle->direction);
+    JAVACALL_REPORT_INFO2(JC_DIO, "Pin %d direction: %d", pinHandle->number, pinHandle->direction);
     *pDirection = pinHandle->direction;
     return JAVACALL_DIO_OK;
 }
@@ -438,15 +438,15 @@
     GPIOHandle* pin;
     javacall_result listOperationsResult;
     javautil_list_reset_iterator(portHandle->pinList);
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Set direction %d to port", direction);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Set direction %d to port", direction);
 
     while(JAVACALL_DIO_FAIL != (listOperationsResult = javautil_list_get_next(portHandle->pinList, (javacall_handle*) &pin))) {
         if(JAVACALL_DIO_INVALID_CONFIG == listOperationsResult) {
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "Invalid handle of GPIO port was passed to set direction function. Operation aborted");
+            JAVACALL_REPORT_ERROR(JC_DIO, "Invalid handle of GPIO port was passed to set direction function. Operation aborted");
             return JAVACALL_DIO_FAIL;
         }
         if(JAVACALL_DIO_OK != javacall_gpio_pin_direction_set(pin, direction)) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "Set direction operation to port failed, because error with pin %d occurred", pin->number);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "Set direction operation to port failed, because error with pin %d occurred", pin->number);
             return JAVACALL_DIO_FAIL;
         };
     }
@@ -472,7 +472,7 @@
             JAVACALL_TRIGGER_RISING_EDGE != trigger &&
             JAVACALL_TRIGGER_NONE != trigger &&
             JAVACALL_TRIGGER_BOTH_EDGES != trigger) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Unsupported or invalid trigger value: %d", trigger);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Unsupported or invalid trigger value: %d", trigger);
         return JAVACALL_DIO_INVALID_CONFIG;
     }
     return JAVACALL_DIO_OK;
@@ -493,7 +493,7 @@
     javacall_dio_result pinCondition;
     int directionFD;
 
-    JAVACALL_REPORT_INFO3(JC_DAAPI, "Try to open pin %d on port %d with direction %d", pin, port, direction);
+    JAVACALL_REPORT_INFO3(JC_DIO, "Try to open pin %d on port %d with direction %d", pin, port, direction);
 
     if (JAVACALL_FALSE == exclusive) {
         // exclusive mode only
@@ -504,14 +504,14 @@
     if(pin == PERIPHERAL_CONFIG_DEFAULT){ pin = 2;}
 
     if (0 < port) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "Only port 0 can be accepted");
+        JAVACALL_REPORT_ERROR(JC_DIO, "Only port 0 can be accepted");
         return JAVACALL_DIO_NOT_FOUND;
     }
 
     lock_pin_list();
 
     if (JAVACALL_FALSE == check_gpio_pin_is_free(pin)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "GPIO pin %d busy", pin);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "GPIO pin %d busy", pin);
         unlock_pin_list();
         return JAVACALL_DIO_BUSY;
     }
@@ -533,7 +533,7 @@
     directionFD = open(bufForDirectionFilename, O_WRONLY);
 
     if(-1 == directionFD) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI,
+            JAVACALL_REPORT_ERROR1(JC_DIO,
                                     "Can not open %s file to configure GPIO pin direction",
                                     directionFD);
             unlock_pin_list();
@@ -541,7 +541,7 @@
     }
 
     if(JAVACALL_DIO_OK != write_direction_to_file(directionFD, direction, initValue)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not set direction while open GPIO pin %d Open failed", pin);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not set direction while open GPIO pin %d Open failed", pin);
         close(directionFD);
         unlock_pin_list();
         return JAVACALL_DIO_FAIL;
@@ -550,7 +550,7 @@
     handle = (GPIOHandle*) javacall_malloc(sizeof(GPIOHandle));
 
     if(NULL == handle) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Unexpected error when open GPIO pin %d Out of memory", pin);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Unexpected error when open GPIO pin %d Out of memory", pin);
         close(directionFD);
         unlock_pin_list();
         return JAVACALL_DIO_FAIL;
@@ -565,7 +565,7 @@
     handle->next = NULL;
 
     if(JAVACALL_DIO_OK != fill_value_fd_for_pin(handle)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not fill valueFD for pin %d Open failed", pin);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not fill valueFD for pin %d Open failed", pin);
         close(directionFD);
         javacall_free(handle);
         unlock_pin_list();
@@ -576,7 +576,7 @@
     add_to_pin_list(handle);
     unlock_pin_list();
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "GPIO pin %d open successfully done", pin);
+    JAVACALL_REPORT_INFO1(JC_DIO, "GPIO pin %d open successfully done", pin);
     return JAVACALL_DIO_OK;
 }
 
@@ -597,7 +597,7 @@
     javacall_handle listHandle;
     GPIOPortHandle* handle;
     GPIOHandle* pinHandle;
-    JAVACALL_REPORT_INFO(JC_DAAPI, "Open GPIO port started");
+    JAVACALL_REPORT_INFO(JC_DIO, "Open GPIO port started");
 
     if (JAVACALL_FALSE == exclusive) {
         // exclusive mode only
@@ -606,13 +606,13 @@
 
     for(; i < pinCount; i++) {
         if(JAVACALL_FALSE == check_gpio_pin_is_free(portsAndPins[i][1])) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "GPIO pin %d busy", portsAndPins[i][1]);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "GPIO pin %d busy", portsAndPins[i][1]);
             return JAVACALL_DIO_BUSY;
         }
     }
 
     if(JAVACALL_OK != javautil_list_create(&listHandle)) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "Unexpected error occurred while GPIO port open. Can not create list of pins");
+        JAVACALL_REPORT_ERROR(JC_DIO, "Unexpected error occurred while GPIO port open. Can not create list of pins");
         return JAVACALL_DIO_FAIL;
     };
 
@@ -623,14 +623,14 @@
         trigger = portsAndPins[i][3];
         pinState = javacall_gpio_pin_open(0, pin, direction, mode, trigger, JAVACALL_FALSE, JAVACALL_TRUE, (javacall_handle*) &pinHandle);
         if(JAVACALL_DIO_OK != pinState) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not open pin %d, so port open operation aborted", pin);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "Can not open pin %d, so port open operation aborted", pin);
             close_pins_in_list(listHandle);
             javautil_list_destroy(listHandle);
             return JAVACALL_DIO_FAIL;
         }
         pinHandle->inPort = JAVACALL_TRUE;
         if(JAVACALL_OK != javautil_list_add(listHandle, pinHandle)) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "Unexpected error while adding pin %d to port list", pin);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "Unexpected error while adding pin %d to port list", pin);
             javacall_gpio_pin_close(pinHandle);
             close_pins_in_list(listHandle);
             javautil_list_destroy(listHandle);
@@ -640,7 +640,7 @@
 
     handle = (GPIOPortHandle*) javacall_malloc(sizeof(GPIOPortHandle));
     if(NULL == handle) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "Unexpected error occurred while GPIO port open: Out of memory");
+        JAVACALL_REPORT_ERROR(JC_DIO, "Unexpected error occurred while GPIO port open: Out of memory");
         close_pins_in_list(listHandle);
         javautil_list_destroy(listHandle);
         return JAVACALL_DIO_OUT_OF_MEMORY;
@@ -657,7 +657,7 @@
             return JAVACALL_DIO_FAIL;
         };
     }
-    JAVACALL_REPORT_INFO(JC_DAAPI, "Open GPIO port successfully done");
+    JAVACALL_REPORT_INFO(JC_DIO, "Open GPIO port successfully done");
 
     handle->needPinClose = JAVACALL_TRUE;
 
@@ -702,14 +702,14 @@
     int expordFD = open(EXPORT_FILE_NAME, O_WRONLY);
 
     if(-1 == expordFD) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not open %s file to export gpio."
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not open %s file to export gpio."
             "May be, there is necessary superuser rights", EXPORT_FILE_NAME);
         return JAVACALL_DIO_FAIL;
     }
 
     snprintf(pinNameBuffer, 4, PIN_NAME_TEMPLATE, pinNumber);
     if(-1 == write(expordFD, pinNameBuffer, 4)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "There is unexpected error, when open GPIO pin %d", pinNumber);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "There is unexpected error, when open GPIO pin %d", pinNumber);
         close(expordFD);
         return JAVACALL_DIO_FAIL;
     };
@@ -727,11 +727,11 @@
     if(-1 != unexportFD) {
         snprintf(nameOfPinBuffer, 4, PIN_NAME_TEMPLATE, pinNumber);
         if(-1 == write(unexportFD, nameOfPinBuffer, 4)) {
-            JAVACALL_REPORT_WARN1(JC_DAAPI, "Can not unexport GPIO pin %d", pinNumber);
+            JAVACALL_REPORT_WARN1(JC_DIO, "Can not unexport GPIO pin %d", pinNumber);
         }
         close(unexportFD);
     } else {
-        JAVACALL_REPORT_WARN(JC_DAAPI, "Can not open unexport file for GPIO");
+        JAVACALL_REPORT_WARN(JC_DIO, "Can not open unexport file for GPIO");
         return JAVACALL_DIO_FAIL;
     }
 
@@ -742,14 +742,14 @@
     javacall_ascii_string platformDirectionString;
 
     if(-1 == dirFD) {
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "Invalid file descriptor was passed to configure GPIO pin direction");
+            JAVACALL_REPORT_ERROR(JC_DIO, "Invalid file descriptor was passed to configure GPIO pin direction");
             return JAVACALL_DIO_FAIL;
     }
 
     get_platform_direction_string(direction, initialValue, &platformDirectionString);
 
     if(-1 == write(dirFD, platformDirectionString, strlen(platformDirectionString))) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "There is unexpected error, when configure direction of GPIO pin");
+        JAVACALL_REPORT_ERROR(JC_DIO, "There is unexpected error, when configure direction of GPIO pin");
         return JAVACALL_DIO_FAIL;
     }
 
@@ -763,7 +763,7 @@
 
     lseek(handle->valueFD, 0, SEEK_SET);
     if(-1 == write(handle->valueFD, outValue, 1)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not write value to GPIO pin %d", handle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not write value to GPIO pin %d", handle->number);
         return JAVACALL_DIO_FAIL;
     }
 
@@ -775,7 +775,7 @@
 
     lseek(handle->valueFD, 0, SEEK_SET);
     if(-1 == read(handle->valueFD, inBuffer, 2)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not read value from valueFD file for GPIO pin %d", handle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not read value from valueFD file for GPIO pin %d", handle->number);
         return JAVACALL_DIO_FAIL;
     }
 
@@ -784,7 +784,7 @@
     } else if(49 == inBuffer[0]) {
         *value = JAVACALL_TRUE;
     } else {
-        JAVACALL_REPORT_ERROR3(JC_DAAPI, "Error values from value GPIO pin %d file was readed: %d %d", handle->number, inBuffer[0], inBuffer[1]);
+        JAVACALL_REPORT_ERROR3(JC_DIO, "Error values from value GPIO pin %d file was readed: %d %d", handle->number, inBuffer[0], inBuffer[1]);
         return JAVACALL_DIO_FAIL;
     }
     return JAVACALL_DIO_OK;
@@ -807,13 +807,13 @@
     javautil_list_reset_iterator(list);
     while(JAVACALL_FAIL != (listOperationsResult = javautil_list_get_next(list, (javacall_handle*) &pin))) {
         if(JAVACALL_INVALID_ARGUMENT == listOperationsResult) {
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "Invalid handle of GPIO port was passed to close function. Operation aborted");
+            JAVACALL_REPORT_ERROR(JC_DIO, "Invalid handle of GPIO port was passed to close function. Operation aborted");
             return JAVACALL_DIO_FAIL;
         }
         if (JAVACALL_FAIL == listOperationsResult) {
             javacall_gpio_pin_close(pin);
         } else {
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "Unknown error retrieving GPIO port handle. Operation aborted");
+            JAVACALL_REPORT_ERROR(JC_DIO, "Unknown error retrieving GPIO port handle. Operation aborted");
             return JAVACALL_DIO_FAIL;
         }
     }
@@ -860,7 +860,7 @@
         pthread_mutex_unlock(&epoll_fd_lock);
     }
     pthread_mutex_unlock(&epoll_fd_lock);
-    JAVACALL_REPORT_INFO(JC_DAAPI, "Notifications thread stop executing. No pins for polling");
+    JAVACALL_REPORT_INFO(JC_DIO, "Notifications thread stop executing. No pins for polling");
     return NULL;
 }
 
@@ -869,7 +869,7 @@
     epoll_event* new_event = (epoll_event*) javacall_malloc(sizeof(epoll_event));
 
     if(NULL == new_event) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "OUT of memory");
+        JAVACALL_REPORT_ERROR(JC_DIO, "OUT of memory");
         return JAVACALL_DIO_OUT_OF_MEMORY;
     }
 
@@ -889,7 +889,7 @@
         epoll_descriptor = epoll_create(17);
     }
     if(-1 == epoll_ctl(epoll_descriptor, EPOLL_CTL_ADD, pinHandle->valueFD, new_event)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Add value file of pin %d to polling failed", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Add value file of pin %d to polling failed", pinHandle->number);
         pthread_mutex_unlock(&epoll_fd_lock);
         javacall_free(new_event);
         javacall_free(poll_data);
@@ -905,9 +905,9 @@
 
 javacall_dio_result del_pin_from_polling(GPIOHandle* pinHandle) {
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Remove value file of pin %d from polling", pinHandle->number);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Remove value file of pin %d from polling", pinHandle->number);
     if(-1 == epoll_ctl(epoll_descriptor, EPOLL_CTL_DEL, pinHandle->valueFD, NULL)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Del value file of pin %d to polling failed", pinHandle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Del value file of pin %d to polling failed", pinHandle->number);
         return JAVACALL_FAIL;
     };
     pinCountForPolling--;
@@ -922,14 +922,14 @@
     char nameBuffer[VALUE_FILENAME_MAX_LENGTH];
 
     if(JAVACALL_DIO_OK != determine_name_of_value_file(handle, nameBuffer)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not fill valueFD for pin %d. Operation failed", handle->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not fill valueFD for pin %d. Operation failed", handle->number);
         return JAVACALL_DIO_FAIL;
     }
 
     handle->valueFD = open(nameBuffer, O_RDWR);
 
     if(-1 == handle->valueFD) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "Can not open file %s for read value from GPIO pin");
+        JAVACALL_REPORT_ERROR(JC_DIO, "Can not open file %s for read value from GPIO pin");
         return JAVACALL_DIO_FAIL;
     }
     return JAVACALL_DIO_OK;
@@ -945,18 +945,18 @@
     while(JAVACALL_FAIL != javautil_list_get_next(portHandle->pinList, (javacall_handle*) &pin)) {
 
         if(JAVACALL_TRUE == pin->notificationsEnabled) {
-            JAVACALL_REPORT_WARN1(JC_DAAPI, "Notifications are already activated for pin %d it is not normal", pin->number);
+            JAVACALL_REPORT_WARN1(JC_DIO, "Notifications are already activated for pin %d it is not normal", pin->number);
             continue;
         }
 
         if(JAVACALL_DIO_OK != activate_platform_notifications_to_pin(pin)) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "Platform notifications for pin %d cannot be enabled", pin->number);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "Platform notifications for pin %d cannot be enabled", pin->number);
             return JAVACALL_DIO_FAIL;
         }
 
         new_event = (epoll_event*) javacall_malloc(sizeof(epoll_event));
         if(NULL == new_event) {
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "OUT of memory");
+            JAVACALL_REPORT_ERROR(JC_DIO, "OUT of memory");
             success = JAVACALL_FALSE;
             break;
         }
@@ -976,7 +976,7 @@
             epoll_descriptor = epoll_create(17);
         }
         if(-1 == epoll_ctl(epoll_descriptor, EPOLL_CTL_ADD, pin->valueFD, new_event)) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "Add value file of pin %d to polling failed", pin->number);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "Add value file of pin %d to polling failed", pin->number);
             javacall_free(new_event);
             javacall_free(poll_data);
             success = JAVACALL_FALSE;
@@ -992,10 +992,10 @@
         javautil_list_reset_iterator(portHandle->pinList);
         while(JAVACALL_OK == javautil_list_get_next(portHandle->pinList, (javacall_handle*) &pin)) {
             if(JAVACALL_OK != del_pin_from_polling(pin)) {
-                JAVACALL_REPORT_WARN1(JC_DAAPI, "Can not remove pin %d from polling", pin->number);
+                JAVACALL_REPORT_WARN1(JC_DIO, "Can not remove pin %d from polling", pin->number);
             }
         }
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "Fail while set notifications for GPIO port");
+        JAVACALL_REPORT_ERROR(JC_DIO, "Fail while set notifications for GPIO port");
         return JAVACALL_DIO_FAIL;
     }
 
@@ -1009,7 +1009,7 @@
 
     while(JAVACALL_OK == javautil_list_get_next(portHandle->pinList, (javacall_handle*) &pin)) {
         if(JAVACALL_DIO_OK != del_pin_from_polling(pin)) {
-            JAVACALL_REPORT_WARN1(JC_DAAPI, "Can not remove pin %d from polling", pin->number);
+            JAVACALL_REPORT_WARN1(JC_DIO, "Can not remove pin %d from polling", pin->number);
         }
     }
 
@@ -1021,19 +1021,19 @@
     int edgeFD;
     javacall_ascii_string platformValue;
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "Enable notifications for pin %d", pin->number);
+    JAVACALL_REPORT_INFO1(JC_DIO, "Enable notifications for pin %d", pin->number);
 
     snprintf(bufferForEdgeFileName, EDGE_FILENAME_MAX_LENGTH, GPIO_EDGE_FILENAME_TEMPLATE, pin->number);
 
     edgeFD = open(bufferForEdgeFileName, O_WRONLY);
 
     if(-1 == edgeFD) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can open edge file for pin %d", pin->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can open edge file for pin %d", pin->number);
         return JAVACALL_FAIL;
     }
     get_platform_edge_string(pin->edgeMode, &platformValue);
     if(-1 == write(edgeFD, platformValue, strlen(platformValue) + 1)) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Can not set notifications to edge file for pin %d", pin->number);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Can not set notifications to edge file for pin %d", pin->number);
         close(edgeFD);
         return JAVACALL_DIO_FAIL;
     }
@@ -1069,7 +1069,7 @@
     if(1 == pinCountForPolling && JAVACALL_FALSE == notificationThreadActivated) {
         pthread_create(&notificationThread, NULL, &pin_events_listener_function, NULL);
         notificationThreadActivated = JAVACALL_TRUE;
-        JAVACALL_REPORT_INFO(JC_DAAPI, "Notifications thread created and starts executing");
+        JAVACALL_REPORT_INFO(JC_DIO, "Notifications thread created and starts executing");
     }
 }
 
--- a/src/share/linux/native/com/oracle/dio/i2c/i2c.c	Mon Sep 08 16:54:30 2014 +0400
+++ b/src/share/linux/native/com/oracle/dio/i2c/i2c.c	Tue Sep 09 10:20:51 2014 -0400
@@ -88,7 +88,7 @@
      * created new 'i2c_bus' */
     tmpBus = (i2c_bus*) javacall_malloc(sizeof(i2c_bus));
     if (tmpBus == NULL ) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[I2C] cannot alloc i2c_bus");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[I2C] cannot alloc i2c_bus");
         return JAVACALL_DIO_OUT_OF_MEMORY;
     }
 
@@ -147,7 +147,7 @@
         busCur = busCur->next;
     }
 
-    JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] inconsistency in bus list, failed to release %d", bus->busId);
+    JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] inconsistency in bus list, failed to release %d", bus->busId);
 
     /* 'bus' bus hasn't been found */
     return JAVACALL_DIO_FAIL;
@@ -197,7 +197,7 @@
 
     /* Check if there are no given slave in the list */
     if (NULL == slaveCur) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] inconsistency in slave list, failed to release %d", slave->address);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] inconsistency in slave list, failed to release %d", slave->address);
         javacall_free(slave);
         return JAVACALL_DIO_FAIL;
     }
@@ -230,7 +230,7 @@
         while ((rv = close(slave->fd)) < 0 && EINTR == errno);
 
         if (rv != 0)
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] cannot close bus fd, errno=%d", errno);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] cannot close bus fd, errno=%d", errno);
     }
 
     /* dealloc descriptor */
@@ -254,7 +254,7 @@
     *pHandle = NULL;
 
     if (JAVACALL_TRUE != exclusive) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[I2C] Shared mode is unsupported for I2C device");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[I2C] Shared mode is unsupported for I2C device");
         return JAVACALL_DIO_UNSUPPORTED_ACCESS_MODE;
     }
 
@@ -265,19 +265,19 @@
         busNum = 1;
 
     if (addrSize != 7) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "i2c config error: addrSize != 7");
+        JAVACALL_REPORT_ERROR(JC_DIO, "i2c config error: addrSize != 7");
         return JAVACALL_DIO_INVALID_CONFIG;
     }
 
     if (busNum < 0) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI,
+        JAVACALL_REPORT_ERROR(JC_DIO,
                 "i2c config error: busNum should not be less than zero");
         return JAVACALL_DIO_FAIL;
     }
 
     slave = (i2c_slave*) javacall_calloc(1, sizeof(i2c_slave));
     if (slave == NULL) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI,
+        JAVACALL_REPORT_ERROR(JC_DIO,
                 "malloc error in javacall_i2c_open_slave_with_config");
         return JAVACALL_DIO_OUT_OF_MEMORY;
     }
@@ -291,13 +291,13 @@
 
     if (slave->fd < 0) {
         i2c_close_slave(slave);
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] cannot open %s bus file", filename);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] cannot open %s bus file", filename);
         return JAVACALL_DIO_FAIL;
     }
 
     /* Set target address */
     if (ioctl(slave->fd, I2C_SLAVE, slave->address) < 0) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] cannot set %d address", slave->address);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] cannot set %d address", slave->address);
         i2c_close_slave(slave);
         return JAVACALL_DIO_FAIL;
     }
@@ -320,19 +320,19 @@
     int type = ctx->type;
     int rv;
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "[I2C] Transfer start (%d)", type);
+    JAVACALL_REPORT_INFO1(JC_DIO, "[I2C] Transfer start (%d)", type);
 
     if (WRITE == type) {
         rv = (int)write(ctx->fd, pData, len);
 
         if (-1 == rv) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] failed to write, errno=%d", errno);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] failed to write, errno=%d", errno);
         }
     } else {
         rv = (int)read(ctx->fd, pData, len);
 
         if (-1 == rv) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] failed to read, errno=%d", errno);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] failed to read, errno=%d", errno);
         }
     }
 
@@ -346,7 +346,7 @@
 
     javacall_free(ctx);
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "[I2C] Transfer end. rv=%d", rv);
+    JAVACALL_REPORT_INFO1(JC_DIO, "[I2C] Transfer end. rv=%d", rv);
     return (void*)rv;
 }
 
@@ -374,7 +374,7 @@
 
     i2c_io_context *ctx = javacall_malloc(sizeof(i2c_io_context));
     if (NULL == ctx) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI,
+        JAVACALL_REPORT_ERROR1(JC_DIO,
                                "[I2C] cannot allocate temp buffer: errno=%d", errno);
         return JAVACALL_DIO_OUT_OF_MEMORY;
     }
@@ -387,7 +387,7 @@
 
     if (pthread_create(&pDev->context, NULL, io_thread, ctx) != 0) {
         javacall_free(ctx);
-        JAVACALL_REPORT_ERROR1(JC_DAAPI,
+        JAVACALL_REPORT_ERROR1(JC_DIO,
                                "[I2C] failed to start read operation: errno=%d", errno);
         return JAVACALL_DIO_FAIL;
     }
@@ -405,7 +405,7 @@
         pthread_detach(pDev->context);
     } else {
         if (0 != pthread_join(pDev->context, (void**)pBytes)) {
-            JAVACALL_REPORT_ERROR1(JC_DAAPI, "[I2C] Can't joint thread: %d", errno);
+            JAVACALL_REPORT_ERROR1(JC_DIO, "[I2C] Can't joint thread: %d", errno);
         }
     }
 
--- a/src/share/linux/native/com/oracle/dio/mmio/mmio.c	Mon Sep 08 16:54:30 2014 +0400
+++ b/src/share/linux/native/com/oracle/dio/mmio/mmio.c	Tue Sep 09 10:20:51 2014 -0400
@@ -47,7 +47,7 @@
 javacall_result check_addr_len(const int addr, const int len) {
     if (addr > BASE_ADDR + BLOCK_LEN || addr + len > BASE_ADDR + BLOCK_LEN ||
         addr < BASE_ADDR || addr + len < BASE_ADDR) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "Invalid MMIO address %d\n", addr);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "Invalid MMIO address %d\n", addr);
         return JAVACALL_FAIL;
     }
 
@@ -71,7 +71,7 @@
     /* open /dev/mem */
     if (0 == mem_fd && (mem_fd = open("/dev/mem", O_RDWR|O_SYNC) ) < 0) {
         mem_fd = 0;
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "cannot open /dev/mem \n");
+        JAVACALL_REPORT_ERROR(JC_DIO, "cannot open /dev/mem \n");
         return JAVACALL_FAIL;
     }
 
@@ -89,7 +89,7 @@
               );
 
     if (result == (void*)-1) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "cannot remap: \n", errno);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "cannot remap: \n", errno);
         close(mem_fd);
         return JAVACALL_FAIL;
     }
@@ -113,7 +113,7 @@
     javacall_result result = JAVACALL_OK;
     javacall_int32* tmp = (javacall_int32*)handle;
     if (0 != munmap((void*)tmp[0], (size_t)tmp[1])) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "cannot release maped memory");
+        JAVACALL_REPORT_ERROR(JC_DIO, "cannot release maped memory");
         result = JAVACALL_FAIL;
     }
 
--- a/src/share/linux/native/com/oracle/dio/spibus/spi.c	Mon Sep 08 16:54:30 2014 +0400
+++ b/src/share/linux/native/com/oracle/dio/spibus/spi.c	Tue Sep 09 10:20:51 2014 -0400
@@ -150,7 +150,7 @@
     javacall_dio_result res;
 
     if (JAVACALL_TRUE != exclusive) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[SPI] Shared mode is unsupported for SPI device");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[SPI] Shared mode is unsupported for SPI device");
         return JAVACALL_DIO_UNSUPPORTED_ACCESS_MODE;
     }
 
@@ -160,7 +160,7 @@
 
     spi_slave_config* cfg = (spi_slave_config*) javacall_malloc(sizeof(spi_slave_config));
     if (NULL == cfg) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "malloc error in javacall_spi_open_slave_with_config()\n");
+        JAVACALL_REPORT_ERROR(JC_DIO, "malloc error in javacall_spi_open_slave_with_config()\n");
         return JAVACALL_DIO_OUT_OF_MEMORY;
     }
 
@@ -246,7 +246,7 @@
 */
 javacall_dio_result javacall_spi_send_and_receive_finish(javacall_handle handle, const javacall_bool cancel,
                                                          const char* pTxBuf, /*OUT*/char* pRxBuf, const int len) {
-    JAVACALL_REPORT_ERROR(JC_DAAPI, "javacall_spi_send_and_receive_finish");
+    JAVACALL_REPORT_ERROR(JC_DIO, "javacall_spi_send_and_receive_finish");
     return JAVACALL_DIO_FAIL;
 }
 
@@ -320,19 +320,19 @@
 
     /* spi mode */
     if (ioctl(cfg->devFd, SPI_IOC_WR_MODE, &mode) < 0) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[SPI] Can't setup mode");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[SPI] Can't setup mode");
         return JAVACALL_DIO_FAIL;
     }
 
     /* bits per word */
     if (ioctl(cfg->devFd, SPI_IOC_WR_BITS_PER_WORD, &bits) < 0) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[SPI] Can't bits per word");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[SPI] Can't bits per word");
         return JAVACALL_DIO_FAIL;
     }
 
     /* max speed hz */
     if (ioctl(cfg->devFd, SPI_IOC_WR_MAX_SPEED_HZ, &speed) < 0) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[SPI] Can't setup speed");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[SPI] Can't setup speed");
         return JAVACALL_DIO_FAIL;
     }
 
@@ -351,7 +351,7 @@
     }
 
     if (!c) {
-        JAVACALL_REPORT_INFO(JC_DAAPI, "[SPI] Skip empty transaction");
+        JAVACALL_REPORT_INFO(JC_DIO, "[SPI] Skip empty transaction");
         return JAVACALL_DIO_OK;
     }
 
@@ -373,7 +373,7 @@
         next = &((*next)->next);
     }
 
-    JAVACALL_REPORT_INFO1(JC_DAAPI, "[SPI] Transfer %d messages", c);
+    JAVACALL_REPORT_INFO1(JC_DIO, "[SPI] Transfer %d messages", c);
 
     res = (ioctl(cfg->devFd, SPI_IOC_MESSAGE(c), tr) < 0) ? JAVACALL_DIO_FAIL : JAVACALL_DIO_OK;
     javacall_free(tr);
--- a/src/share/linux/native/com/oracle/dio/uart/serial.c	Mon Sep 08 16:54:30 2014 +0400
+++ b/src/share/linux/native/com/oracle/dio/uart/serial.c	Tue Sep 09 10:20:51 2014 -0400
@@ -145,7 +145,7 @@
 
     p->event_fd = eventfd(0, O_NONBLOCK);
     if (p->event_fd == -1){
-        JAVACALL_REPORT_ERROR(JC_DAAPI,
+        JAVACALL_REPORT_ERROR(JC_DIO,
                 "[UART] eventfd error while creating port descriptor");
         return JAVACALL_FAIL;
     }
@@ -156,13 +156,13 @@
 
     // allocate input buffer
     if(JAVACALL_OK != javautil_circular_buffer_create(&(p->inBuffer), p->buffer_max_size, sizeof(char))){
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[UART] income buffer initialization error");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[UART] income buffer initialization error");
         return JAVACALL_FAIL;
     }
 
     // initialize mutex
     if ( pthread_mutex_init(&(p->lock), NULL) != 0 ) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI, "[UART] mutex initialization error");
+        JAVACALL_REPORT_ERROR(JC_DIO, "[UART] mutex initialization error");
         return JAVACALL_FAIL;
     }
 
@@ -199,7 +199,7 @@
 
     p = (serial_handle) javacall_malloc( sizeof(SERIAL_DESC) );
     if (NULL == p) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI,
+        JAVACALL_REPORT_ERROR(JC_DIO,
                 "[UART] malloc error while creating port descriptor");
         return JAVACALL_OUT_OF_MEMORY;
     }
@@ -329,13 +329,13 @@
 
     while (-1 == (rv = close(p->event_fd)) && EINTR == errno);
     if (rv != 0) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "[UART] cannot close event_fd, errno=%d", errno);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "[UART] cannot close event_fd, errno=%d", errno);
     }
 
     while (-1 == (rv = close(p->fd)) && EINTR == errno);
 
     if (rv != 0) {
-        JAVACALL_REPORT_ERROR1(JC_DAAPI, "[UART] cannot close fd, errno=%d", errno);
+        JAVACALL_REPORT_ERROR1(JC_DIO, "[UART] cannot close fd, errno=%d", errno);
     }
 
     cleanup_write_buffer(p);
@@ -439,7 +439,7 @@
 
     p->out_buffer = javacall_malloc(p->out_buffer_size);
     if (NULL == p->out_buffer) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI,
+        JAVACALL_REPORT_ERROR(JC_DIO,
                 "[UART] malloc error while jc_serial_write_common");
         return JAVACALL_OUT_OF_MEMORY;
     }
@@ -452,13 +452,13 @@
               if(JAVACALL_OK == serial_create_thread(handle, write_thread, &p->write_thread)) {
                 result = JAVACALL_WOULD_BLOCK;
               }else{
-                JAVACALL_REPORT_ERROR(JC_DAAPI, "[UART] cannot create writing thread");
+                JAVACALL_REPORT_ERROR(JC_DIO, "[UART] cannot create writing thread");
               }
             }else{
-                JAVACALL_REPORT_ERROR(JC_DAAPI, "[UART]  condition variable initialization error");
+                JAVACALL_REPORT_ERROR(JC_DIO, "[UART]  condition variable initialization error");
             }
         }else{
-            JAVACALL_REPORT_ERROR(JC_DAAPI, "[UART] mutex initialization error");
+            JAVACALL_REPORT_ERROR(JC_DIO, "[UART] mutex initialization error");
         }
 
         if (result == JAVACALL_FAIL){
--- a/src/share/linux/native/com/oracle/dio/uart/uart.c	Mon Sep 08 16:54:30 2014 +0400
+++ b/src/share/linux/native/com/oracle/dio/uart/uart.c	Tue Sep 09 10:20:51 2014 -0400
@@ -446,7 +446,7 @@
     p = (serial_handle)javacall_malloc(sizeof(UART_DESC));
 
     if (NULL == p) {
-        JAVACALL_REPORT_ERROR(JC_DAAPI,
+        JAVACALL_REPORT_ERROR(JC_DIO,
                 "[UART] malloc error while creating port descriptor");
         return JAVACALL_DIO_OUT_OF_MEMORY;
     }